Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2023-08-16 13:17:42 +03:00
parent 0678e72908
commit 78f0ae14d7
70 changed files with 4159 additions and 2355 deletions

View File

@@ -5,87 +5,11 @@ info:
title: PkgdashService API
version: 0.0.1
paths:
/v1/comment:
/v1/comments/{id}/comments:
get:
tags:
- PkgdashService
operationId: GetComments
parameters:
- name: id
in: query
schema:
type: array
items:
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/GetCommentsRsp'
/v1/module:
get:
tags:
- PkgdashService
operationId: GetModule
parameters:
- name: id
in: query
schema:
type: array
items:
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/GetModuleRsp'
/v1/package:
post:
tags:
- PkgdashService
operationId: AddPackage
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AddPackageReq'
required: true
responses:
default:
description: Default
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorRsp'
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AddPackageRsp'
/v1/package/{id}:
post:
tags:
- PkgdashService
operationId: UpdateInfo
operationId: CommentsLookup
parameters:
- name: id
in: path
@@ -93,12 +17,11 @@ paths:
schema:
type: integer
format: uint64
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/UpdatePackageReq'
required: true
- name: package_id
in: query
schema:
type: integer
format: uint64
responses:
default:
description: Default
@@ -111,24 +34,12 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/UpdatePackageRsp'
/v1/package/{pkg}/comment:
post:
$ref: '#/components/schemas/CommentsLookupRsp'
/v1/modules:
get:
tags:
- PkgdashService
operationId: AddComment
parameters:
- name: pkg
in: path
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AddCommentReq'
required: true
operationId: ModulesList
responses:
default:
description: Default
@@ -141,12 +52,12 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/AddCommentRsp'
$ref: '#/components/schemas/ModulesListRsp'
/v1/packages:
get:
tags:
- PkgdashService
operationId: ListPackage
operationId: PackagesList
responses:
default:
description: Default
@@ -159,40 +70,173 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/ListPackageRsp'
$ref: '#/components/schemas/PackagesListRsp'
post:
tags:
- PkgdashService
operationId: PackagesCreate
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/PackagesCreateReq'
required: true
responses:
default:
description: Default
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorRsp'
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/PackagesCreateRsp'
/v1/packages/{id}:
put:
tags:
- PkgdashService
operationId: PackagesUpdate
parameters:
- name: id
in: path
required: true
schema:
type: integer
format: uint64
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/PackagesUpdateReq'
required: true
responses:
default:
description: Default
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorRsp'
"200":
description: OK
content:
application/json:
schema:
$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'
/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'
post:
tags:
- PkgdashService
operationId: CommentsCreate
parameters:
- name: package_id
in: path
required: true
schema:
type: integer
format: uint64
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CommentsCreateReq'
required: true
responses:
default:
description: Default
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorRsp'
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/CommentsCreateRsp'
/v1/packages/{package_id}/comments/{id}:
delete:
tags:
- PkgdashService
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
responses:
default:
description: Default
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorRsp'
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/CommentsDeleteRsp'
components:
schemas:
AddCommentReq:
type: object
properties:
idPackage:
type: integer
format: uint64
text:
type: string
AddCommentRsp:
type: object
properties:
id:
type: integer
format: uint64
AddPackageReq:
type: object
properties:
name:
type: string
url:
type: string
modules:
type: array
items:
type: integer
format: uint64
AddPackageRsp:
type: object
properties:
status:
type: string
Comment:
type: object
properties:
@@ -206,9 +250,39 @@ components:
type: string
created:
type: string
format: RFC3339
updated:
type: string
Error:
format: RFC3339
CommentsCreateReq:
type: object
properties:
package_id:
type: integer
format: uint64
text:
type: string
CommentsCreateRsp:
type: object
properties:
comment:
$ref: '#/components/schemas/Comment'
CommentsDeleteRsp:
type: object
properties: {}
CommentsListRsp:
type: object
properties:
comments:
type: array
items:
$ref: '#/components/schemas/Comment'
CommentsLookupRsp:
type: object
properties:
comment:
$ref: '#/components/schemas/Comment'
ErrorRsp:
type: object
properties:
code:
@@ -219,32 +293,6 @@ components:
type: string
details:
type: string
ErrorRsp:
type: object
properties:
error:
$ref: '#/components/schemas/Error'
GetCommentsRsp:
type: object
properties:
comments:
type: array
items:
$ref: '#/components/schemas/Comment'
GetModuleRsp:
type: object
properties:
modules:
type: array
items:
$ref: '#/components/schemas/Module'
ListPackageRsp:
type: object
properties:
packages:
type: array
items:
$ref: '#/components/schemas/Package'
Module:
type: object
properties:
@@ -260,6 +308,19 @@ components:
format: uint64
last_version:
type: string
created:
type: string
format: RFC3339
updated:
type: string
format: RFC3339
ModulesListRsp:
type: object
properties:
modules:
type: array
items:
$ref: '#/components/schemas/Module'
Package:
type: object
properties:
@@ -285,7 +346,40 @@ components:
items:
type: integer
format: uint64
UpdatePackageReq:
created:
type: string
format: RFC3339
updated:
type: string
format: RFC3339
PackagesCreateReq:
type: object
properties:
name:
type: string
url:
type: string
modules:
type: array
items:
type: integer
format: uint64
PackagesCreateRsp:
type: object
properties:
status:
type: string
PackagesDeleteRsp:
type: object
properties: {}
PackagesListRsp:
type: object
properties:
packages:
type: array
items:
$ref: '#/components/schemas/Package'
PackagesUpdateReq:
type: object
properties:
id:
@@ -305,11 +399,10 @@ components:
items:
type: integer
format: uint64
UpdatePackageRsp:
PackagesUpdateRsp:
type: object
properties:
id:
type: integer
format: uint64
package:
$ref: '#/components/schemas/Package'
tags:
- name: PkgdashService