2023-08-12 16:24:50 +03:00
|
|
|
# Generated with protoc-gen-go-micro
|
|
|
|
|
|
|
|
openapi: 3.0.3
|
|
|
|
info:
|
|
|
|
title: PkgdashService API
|
|
|
|
version: 0.0.1
|
|
|
|
paths:
|
2023-08-16 13:17:42 +03:00
|
|
|
/v1/comments/{id}/comments:
|
2023-08-14 14:27:29 +03:00
|
|
|
get:
|
|
|
|
tags:
|
|
|
|
- PkgdashService
|
2023-08-16 13:17:42 +03:00
|
|
|
operationId: CommentsLookup
|
2023-08-14 14:27:29 +03:00
|
|
|
parameters:
|
|
|
|
- name: id
|
2023-08-16 13:17:42 +03:00
|
|
|
in: path
|
|
|
|
required: true
|
|
|
|
schema:
|
|
|
|
type: integer
|
|
|
|
format: uint64
|
|
|
|
- name: package_id
|
2023-08-14 14:27:29 +03:00
|
|
|
in: query
|
|
|
|
schema:
|
2023-08-16 13:17:42 +03:00
|
|
|
type: integer
|
|
|
|
format: uint64
|
2023-08-14 14:27:29 +03:00
|
|
|
responses:
|
|
|
|
default:
|
|
|
|
description: Default
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
$ref: '#/components/schemas/ErrorRsp'
|
|
|
|
"200":
|
|
|
|
description: OK
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
2023-08-16 13:17:42 +03:00
|
|
|
$ref: '#/components/schemas/CommentsLookupRsp'
|
|
|
|
/v1/modules:
|
2023-08-12 16:24:50 +03:00
|
|
|
get:
|
|
|
|
tags:
|
|
|
|
- PkgdashService
|
2023-08-16 13:17:42 +03:00
|
|
|
operationId: ModulesList
|
|
|
|
responses:
|
|
|
|
default:
|
|
|
|
description: Default
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
$ref: '#/components/schemas/ErrorRsp'
|
|
|
|
"200":
|
|
|
|
description: OK
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
$ref: '#/components/schemas/ModulesListRsp'
|
|
|
|
/v1/packages:
|
|
|
|
get:
|
|
|
|
tags:
|
|
|
|
- PkgdashService
|
|
|
|
operationId: PackagesList
|
2023-08-12 16:24:50 +03:00
|
|
|
responses:
|
|
|
|
default:
|
|
|
|
description: Default
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
$ref: '#/components/schemas/ErrorRsp'
|
|
|
|
"200":
|
|
|
|
description: OK
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
2023-08-16 13:17:42 +03:00
|
|
|
$ref: '#/components/schemas/PackagesListRsp'
|
2023-08-12 16:24:50 +03:00
|
|
|
post:
|
|
|
|
tags:
|
|
|
|
- PkgdashService
|
2023-08-16 13:17:42 +03:00
|
|
|
operationId: PackagesCreate
|
2023-08-12 16:24:50 +03:00
|
|
|
requestBody:
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
2023-08-16 13:17:42 +03:00
|
|
|
$ref: '#/components/schemas/PackagesCreateReq'
|
2023-08-12 16:24:50 +03:00
|
|
|
required: true
|
|
|
|
responses:
|
|
|
|
default:
|
|
|
|
description: Default
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
$ref: '#/components/schemas/ErrorRsp'
|
|
|
|
"200":
|
|
|
|
description: OK
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
2023-08-16 13:17:42 +03:00
|
|
|
$ref: '#/components/schemas/PackagesCreateRsp'
|
|
|
|
/v1/packages/{id}:
|
2023-08-18 23:59:15 +03:00
|
|
|
get:
|
|
|
|
tags:
|
|
|
|
- PkgdashService
|
|
|
|
operationId: PackagesLookup
|
|
|
|
parameters:
|
|
|
|
- name: id
|
|
|
|
in: path
|
|
|
|
required: true
|
|
|
|
schema:
|
|
|
|
type: integer
|
|
|
|
format: uint64
|
|
|
|
responses:
|
|
|
|
default:
|
|
|
|
description: Default
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
$ref: '#/components/schemas/ErrorRsp'
|
|
|
|
"200":
|
|
|
|
description: OK
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
$ref: '#/components/schemas/PackagesLookupRsp'
|
2023-08-16 13:17:42 +03:00
|
|
|
put:
|
2023-08-12 16:24:50 +03:00
|
|
|
tags:
|
|
|
|
- PkgdashService
|
2023-08-16 13:17:42 +03:00
|
|
|
operationId: PackagesUpdate
|
2023-08-12 16:24:50 +03:00
|
|
|
parameters:
|
|
|
|
- name: id
|
|
|
|
in: path
|
|
|
|
required: true
|
|
|
|
schema:
|
2023-08-12 20:55:20 +03:00
|
|
|
type: integer
|
|
|
|
format: uint64
|
2023-08-12 16:24:50 +03:00
|
|
|
requestBody:
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
2023-08-16 13:17:42 +03:00
|
|
|
$ref: '#/components/schemas/PackagesUpdateReq'
|
2023-08-12 16:24:50 +03:00
|
|
|
required: true
|
|
|
|
responses:
|
|
|
|
default:
|
|
|
|
description: Default
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
$ref: '#/components/schemas/ErrorRsp'
|
|
|
|
"200":
|
|
|
|
description: OK
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
2023-08-16 13:17:42 +03:00
|
|
|
$ref: '#/components/schemas/PackagesUpdateRsp'
|
|
|
|
delete:
|
|
|
|
tags:
|
|
|
|
- PkgdashService
|
|
|
|
operationId: PackagesDelete
|
|
|
|
parameters:
|
|
|
|
- name: id
|
|
|
|
in: path
|
|
|
|
required: true
|
|
|
|
schema:
|
|
|
|
type: integer
|
|
|
|
format: uint64
|
|
|
|
responses:
|
|
|
|
default:
|
|
|
|
description: Default
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
$ref: '#/components/schemas/ErrorRsp'
|
|
|
|
"200":
|
|
|
|
description: OK
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
$ref: '#/components/schemas/PackagesDeleteRsp'
|
2023-08-18 23:59:15 +03:00
|
|
|
/v1/packages/{id}/modules:
|
|
|
|
get:
|
|
|
|
tags:
|
|
|
|
- PkgdashService
|
|
|
|
operationId: PackagesModules
|
|
|
|
parameters:
|
|
|
|
- name: id
|
|
|
|
in: path
|
|
|
|
required: true
|
|
|
|
schema:
|
|
|
|
type: integer
|
|
|
|
format: uint64
|
|
|
|
responses:
|
|
|
|
default:
|
|
|
|
description: Default
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
$ref: '#/components/schemas/ErrorRsp'
|
|
|
|
"200":
|
|
|
|
description: OK
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
$ref: '#/components/schemas/PackagesModulesRsp'
|
2023-08-16 13:17:42 +03:00
|
|
|
/v1/packages/{package_id}/comments:
|
|
|
|
get:
|
|
|
|
tags:
|
|
|
|
- PkgdashService
|
|
|
|
operationId: CommentsList
|
|
|
|
parameters:
|
|
|
|
- name: package_id
|
|
|
|
in: path
|
|
|
|
required: true
|
|
|
|
schema:
|
|
|
|
type: integer
|
|
|
|
format: uint64
|
|
|
|
responses:
|
|
|
|
default:
|
|
|
|
description: Default
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
$ref: '#/components/schemas/ErrorRsp'
|
|
|
|
"200":
|
|
|
|
description: OK
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
$ref: '#/components/schemas/CommentsListRsp'
|
2023-08-12 16:24:50 +03:00
|
|
|
post:
|
|
|
|
tags:
|
|
|
|
- PkgdashService
|
2023-08-16 13:17:42 +03:00
|
|
|
operationId: CommentsCreate
|
2023-08-12 16:24:50 +03:00
|
|
|
parameters:
|
2023-08-16 13:17:42 +03:00
|
|
|
- name: package_id
|
2023-08-12 16:24:50 +03:00
|
|
|
in: path
|
|
|
|
required: true
|
|
|
|
schema:
|
2023-08-16 13:17:42 +03:00
|
|
|
type: integer
|
|
|
|
format: uint64
|
2023-08-12 16:24:50 +03:00
|
|
|
requestBody:
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
2023-08-16 13:17:42 +03:00
|
|
|
$ref: '#/components/schemas/CommentsCreateReq'
|
2023-08-12 16:24:50 +03:00
|
|
|
required: true
|
|
|
|
responses:
|
|
|
|
default:
|
|
|
|
description: Default
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
$ref: '#/components/schemas/ErrorRsp'
|
|
|
|
"200":
|
|
|
|
description: OK
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
2023-08-16 13:17:42 +03:00
|
|
|
$ref: '#/components/schemas/CommentsCreateRsp'
|
|
|
|
/v1/packages/{package_id}/comments/{id}:
|
|
|
|
delete:
|
2023-08-12 16:24:50 +03:00
|
|
|
tags:
|
|
|
|
- PkgdashService
|
2023-08-16 13:17:42 +03:00
|
|
|
operationId: CommentsDelete
|
|
|
|
parameters:
|
|
|
|
- name: package_id
|
|
|
|
in: path
|
|
|
|
required: true
|
|
|
|
schema:
|
|
|
|
type: integer
|
|
|
|
format: uint64
|
|
|
|
- name: id
|
|
|
|
in: path
|
|
|
|
required: true
|
|
|
|
schema:
|
|
|
|
type: integer
|
|
|
|
format: uint64
|
2023-08-12 16:24:50 +03:00
|
|
|
responses:
|
|
|
|
default:
|
|
|
|
description: Default
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
$ref: '#/components/schemas/ErrorRsp'
|
|
|
|
"200":
|
|
|
|
description: OK
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
2023-08-16 13:17:42 +03:00
|
|
|
$ref: '#/components/schemas/CommentsDeleteRsp'
|
2023-08-12 16:24:50 +03:00
|
|
|
components:
|
|
|
|
schemas:
|
2023-08-14 14:27:29 +03:00
|
|
|
Comment:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
id:
|
|
|
|
type: integer
|
|
|
|
format: uint64
|
|
|
|
package:
|
|
|
|
type: integer
|
|
|
|
format: uint64
|
2023-08-18 23:59:15 +03:00
|
|
|
comment:
|
2023-08-14 14:27:29 +03:00
|
|
|
type: string
|
|
|
|
created:
|
|
|
|
type: string
|
2023-08-16 13:17:42 +03:00
|
|
|
format: RFC3339
|
2023-08-14 14:27:29 +03:00
|
|
|
updated:
|
|
|
|
type: string
|
2023-08-16 13:17:42 +03:00
|
|
|
format: RFC3339
|
|
|
|
CommentsCreateReq:
|
2023-08-12 16:24:50 +03:00
|
|
|
type: object
|
|
|
|
properties:
|
2023-08-16 13:17:42 +03:00
|
|
|
package_id:
|
|
|
|
type: integer
|
|
|
|
format: uint64
|
2023-08-18 23:59:15 +03:00
|
|
|
comment:
|
2023-08-12 16:24:50 +03:00
|
|
|
type: string
|
2023-08-16 13:17:42 +03:00
|
|
|
CommentsCreateRsp:
|
2023-08-12 16:24:50 +03:00
|
|
|
type: object
|
|
|
|
properties:
|
2023-08-16 13:17:42 +03:00
|
|
|
comment:
|
|
|
|
$ref: '#/components/schemas/Comment'
|
|
|
|
CommentsDeleteRsp:
|
|
|
|
type: object
|
|
|
|
properties: {}
|
|
|
|
CommentsListRsp:
|
2023-08-14 14:27:29 +03:00
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
comments:
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
$ref: '#/components/schemas/Comment'
|
2023-08-16 13:17:42 +03:00
|
|
|
CommentsLookupRsp:
|
2023-08-12 16:24:50 +03:00
|
|
|
type: object
|
|
|
|
properties:
|
2023-08-16 13:17:42 +03:00
|
|
|
comment:
|
|
|
|
$ref: '#/components/schemas/Comment'
|
|
|
|
ErrorRsp:
|
2023-08-12 16:24:50 +03:00
|
|
|
type: object
|
|
|
|
properties:
|
2023-08-16 13:17:42 +03:00
|
|
|
code:
|
|
|
|
type: string
|
|
|
|
title:
|
|
|
|
type: string
|
|
|
|
uuid:
|
|
|
|
type: string
|
|
|
|
details:
|
|
|
|
type: string
|
2023-08-12 16:24:50 +03:00
|
|
|
Module:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
id:
|
|
|
|
type: integer
|
|
|
|
format: uint64
|
|
|
|
name:
|
|
|
|
type: string
|
|
|
|
version:
|
|
|
|
type: string
|
|
|
|
package:
|
|
|
|
type: integer
|
|
|
|
format: uint64
|
|
|
|
last_version:
|
|
|
|
type: string
|
2023-08-16 13:17:42 +03:00
|
|
|
created:
|
|
|
|
type: string
|
|
|
|
format: RFC3339
|
|
|
|
updated:
|
|
|
|
type: string
|
|
|
|
format: RFC3339
|
|
|
|
ModulesListRsp:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
modules:
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
$ref: '#/components/schemas/Module'
|
2023-08-12 16:24:50 +03:00
|
|
|
Package:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
id:
|
|
|
|
type: integer
|
|
|
|
format: uint64
|
|
|
|
name:
|
|
|
|
type: string
|
|
|
|
url:
|
|
|
|
type: string
|
|
|
|
modules:
|
2023-08-18 23:59:15 +03:00
|
|
|
type: integer
|
|
|
|
format: uint64
|
2023-08-12 16:24:50 +03:00
|
|
|
issues:
|
2023-08-18 23:59:15 +03:00
|
|
|
type: integer
|
|
|
|
format: uint64
|
2023-08-12 16:24:50 +03:00
|
|
|
comments:
|
2023-08-18 23:59:15 +03:00
|
|
|
type: integer
|
|
|
|
format: uint64
|
2023-08-16 13:17:42 +03:00
|
|
|
created:
|
|
|
|
type: string
|
|
|
|
format: RFC3339
|
|
|
|
updated:
|
|
|
|
type: string
|
|
|
|
format: RFC3339
|
2023-08-18 23:59:15 +03:00
|
|
|
last_check:
|
|
|
|
type: string
|
|
|
|
format: RFC3339
|
2023-08-16 13:17:42 +03:00
|
|
|
PackagesCreateReq:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
name:
|
|
|
|
type: string
|
|
|
|
url:
|
|
|
|
type: string
|
|
|
|
modules:
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
type: integer
|
|
|
|
format: uint64
|
|
|
|
PackagesCreateRsp:
|
|
|
|
type: object
|
|
|
|
properties:
|
2023-08-18 23:59:15 +03:00
|
|
|
package:
|
|
|
|
$ref: '#/components/schemas/Package'
|
2023-08-16 13:17:42 +03:00
|
|
|
PackagesDeleteRsp:
|
|
|
|
type: object
|
|
|
|
properties: {}
|
|
|
|
PackagesListRsp:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
packages:
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
$ref: '#/components/schemas/Package'
|
2023-08-18 23:59:15 +03:00
|
|
|
PackagesLookupRsp:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
package:
|
|
|
|
$ref: '#/components/schemas/Package'
|
|
|
|
PackagesModulesRsp:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
modules:
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
$ref: '#/components/schemas/Module'
|
2023-08-16 13:17:42 +03:00
|
|
|
PackagesUpdateReq:
|
2023-08-12 16:24:50 +03:00
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
id:
|
2023-08-12 20:55:20 +03:00
|
|
|
type: integer
|
|
|
|
format: uint64
|
2023-08-12 16:24:50 +03:00
|
|
|
name:
|
2023-08-12 20:55:20 +03:00
|
|
|
type: string
|
2023-08-12 16:24:50 +03:00
|
|
|
url:
|
2023-08-12 20:55:20 +03:00
|
|
|
type: string
|
2023-08-12 16:24:50 +03:00
|
|
|
modules:
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
type: integer
|
|
|
|
format: uint64
|
|
|
|
issues:
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
type: integer
|
|
|
|
format: uint64
|
2023-08-16 13:17:42 +03:00
|
|
|
PackagesUpdateRsp:
|
2023-08-12 16:24:50 +03:00
|
|
|
type: object
|
|
|
|
properties:
|
2023-08-16 13:17:42 +03:00
|
|
|
package:
|
|
|
|
$ref: '#/components/schemas/Package'
|
2023-08-12 16:24:50 +03:00
|
|
|
tags:
|
|
|
|
- name: PkgdashService
|