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:
|
|
|
|
/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
|
2023-08-12 16:24:50 +03:00
|
|
|
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
|
2023-08-12 16:24:50 +03:00
|
|
|
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
|
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
|
|
|
|
AddPackageRsp:
|
|
|
|
type: object
|
2023-08-12 20:55:20 +03:00
|
|
|
properties:
|
|
|
|
status:
|
|
|
|
type: string
|
2023-08-12 16:24:50 +03:00
|
|
|
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
|
|
|
|
UpdatePackageReq:
|
|
|
|
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
|
|
|
|
UpdatePackageRsp:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
id:
|
|
|
|
type: integer
|
|
|
|
format: uint64
|
|
|
|
tags:
|
|
|
|
- name: PkgdashService
|