pkgdash/proto/apidocs.swagger.yaml

409 lines
13 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/comments/{id}/comments:
2023-08-14 14:27:29 +03:00
get:
tags:
- PkgdashService
operationId: CommentsLookup
2023-08-14 14:27:29 +03:00
parameters:
- name: id
in: path
required: true
schema:
type: integer
format: uint64
- name: package_id
2023-08-14 14:27:29 +03:00
in: query
schema:
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:
$ref: '#/components/schemas/CommentsLookupRsp'
/v1/modules:
get:
tags:
- PkgdashService
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
responses:
default:
description: Default
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorRsp'
"200":
description: OK
content:
application/json:
schema:
$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:
2023-08-12 20:55:20 +03:00
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:
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
format: RFC3339
2023-08-14 14:27:29 +03:00
updated:
type: string
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:
2023-08-14 14:27:29 +03:00
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:
type: string
title:
type: string
uuid:
type: string
details:
type: string
Module:
type: object
properties:
id:
type: integer
format: uint64
name:
type: string
version:
type: string
package:
type: integer
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:
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
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:
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
PackagesUpdateRsp:
type: object
properties:
package:
$ref: '#/components/schemas/Package'
tags:
- name: PkgdashService