pkgdash/proto/apidocs.swagger.yaml

316 lines
9.5 KiB
YAML
Raw Normal View History

# Generated with protoc-gen-go-micro
openapi: 3.0.3
info:
title: PkgdashService API
version: 0.0.1
paths:
2023-08-14 14:27:29 +03:00
/v1/comment:
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
parameters:
- name: id
in: path
required: true
schema:
2023-08-12 20:55:20 +03:00
type: integer
format: uint64
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/UpdatePackageReq'
required: true
responses:
default:
description: Default
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorRsp'
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/UpdatePackageRsp'
/v1/package/{pkg}/comment:
post:
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
responses:
default:
description: Default
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorRsp'
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AddCommentRsp'
/v1/packages:
get:
tags:
- PkgdashService
operationId: ListPackage
responses:
default:
description: Default
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorRsp'
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/ListPackageRsp'
components:
schemas:
AddCommentReq:
type: object
properties:
idPackage:
2023-08-12 20:55:20 +03:00
type: integer
format: uint64
text:
type: string
AddCommentRsp:
type: object
properties:
id:
type: integer
format: uint64
AddPackageReq:
type: object
properties:
name:
2023-08-12 20:55:20 +03:00
type: string
url:
2023-08-12 20:55:20 +03:00
type: string
modules:
type: array
items:
type: integer
format: uint64
AddPackageRsp:
type: object
2023-08-12 20:55:20 +03:00
properties:
status:
type: string
2023-08-14 14:27:29 +03:00
Comment:
type: object
properties:
id:
type: integer
format: uint64
package:
type: integer
format: uint64
text:
type: string
created:
type: string
updated:
type: string
Error:
type: object
properties:
code:
type: string
title:
type: string
uuid:
type: string
details:
type: string
ErrorRsp:
type: object
properties:
error:
$ref: '#/components/schemas/Error'
2023-08-14 14:27:29 +03:00
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:
id:
type: integer
format: uint64
name:
type: string
version:
type: string
package:
type: integer
format: uint64
last_version:
type: string
Package:
type: object
properties:
id:
type: integer
format: uint64
name:
type: string
url:
type: string
modules:
type: array
items:
type: integer
format: uint64
issues:
type: array
items:
type: integer
format: uint64
comments:
type: array
items:
type: integer
format: uint64
UpdatePackageReq:
type: object
properties:
id:
2023-08-12 20:55:20 +03:00
type: integer
format: uint64
name:
2023-08-12 20:55:20 +03:00
type: string
url:
2023-08-12 20:55:20 +03:00
type: string
modules:
type: array
items:
type: integer
format: uint64
issues:
type: array
items:
type: integer
format: uint64
UpdatePackageRsp:
type: object
properties:
id:
type: integer
format: uint64
tags:
- name: PkgdashService