pkgdash/proto/apidocs.swagger.yaml

278 lines
8.7 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:
/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:
$ref: '#/components/schemas/UInt64Value'
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:
$ref: '#/components/schemas/UInt64Value'
text:
type: string
AddCommentRsp:
type: object
properties:
id:
type: integer
format: uint64
AddPackageReq:
type: object
properties:
name:
$ref: '#/components/schemas/StringValue'
url:
$ref: '#/components/schemas/StringValue'
modules:
type: array
items:
type: integer
format: uint64
AddPackageRsp:
type: object
properties: {}
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'
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
StringValue:
type: object
properties:
value:
type: string
description: The string value.
description: Wrapper message for `string`. The JSON representation for `StringValue` is JSON string.
UInt64Value:
type: object
properties:
value:
type: integer
description: The uint64 value.
format: uint64
description: Wrapper message for `uint64`. The JSON representation for `UInt64Value` is JSON string.
UpdatePackageReq:
type: object
properties:
id:
$ref: '#/components/schemas/UInt64Value'
name:
$ref: '#/components/schemas/StringValue'
url:
$ref: '#/components/schemas/StringValue'
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