pkgdash/proto/apidocs.swagger.yaml

520 lines
16 KiB
YAML
Raw Normal View History

# Generated with protoc-gen-go-micro
openapi: 3.0.3
info:
title: Pkgdash API
version: 0.0.1
paths:
/v1/comments/{id}:
2023-08-14 14:27:29 +03:00
get:
tags:
- Pkgdash
operationId: CommentLookup
2023-08-14 14:27:29 +03:00
parameters:
- name: id
in: path
required: true
schema:
type: integer
format: uint64
- name: package
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/CommentLookupRsp'
/v1/modules:
get:
tags:
- Pkgdash
operationId: ModuleList
parameters:
- name: package
in: query
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/ModuleListRsp'
/v1/packages:
get:
tags:
- Pkgdash
operationId: PackageList
responses:
default:
description: Default
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorRsp'
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/PackageListRsp'
post:
tags:
- Pkgdash
operationId: PackageCreate
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/PackageCreateReq'
required: true
responses:
default:
description: Default
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorRsp'
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/PackageCreateRsp'
/v1/packages/{id}:
get:
tags:
- Pkgdash
operationId: PackageLookup
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/PackageLookupRsp'
put:
tags:
- Pkgdash
operationId: PackageUpdate
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/PackageUpdateReq'
required: true
responses:
default:
description: Default
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorRsp'
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/PackageUpdateRsp'
delete:
tags:
- Pkgdash
operationId: PackageDelete
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/PackageDeleteRsp'
/v1/packages/{package_id}/comments/{id}:
delete:
tags:
- Pkgdash
operationId: CommentDelete
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/CommentDeleteRsp'
/v1/packages/{package}/comments:
get:
tags:
- Pkgdash
operationId: CommentList
parameters:
- name: package
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/CommentListRsp'
post:
tags:
- Pkgdash
operationId: CommentCreate
parameters:
- name: package
in: path
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CommentCreateReq'
required: true
responses:
default:
description: Default
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorRsp'
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/CommentCreateRsp'
/v1/packages/{package}/handlers:
get:
tags:
- Pkgdash
operationId: HandlerList
parameters:
- name: package
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/HandlerListRsp'
/v1/packages/{package}/modules:
get:
tags:
- Pkgdash
operationId: PackageModules
parameters:
- name: package
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/PackageModulesRsp'
components:
schemas:
2023-08-14 14:27:29 +03:00
Comment:
type: object
properties:
id:
type: integer
format: uint64
package:
type: integer
format: uint64
comment:
2023-08-14 14:27:29 +03:00
type: string
created:
type: string
format: RFC3339
2023-08-14 14:27:29 +03:00
updated:
type: string
format: RFC3339
CommentCreateReq:
type: object
properties:
package_id:
type: integer
format: uint64
comment:
type: string
CommentCreateRsp:
type: object
properties:
comment:
$ref: '#/components/schemas/Comment'
CommentDeleteRsp:
type: object
properties: {}
CommentListRsp:
2023-08-14 14:27:29 +03:00
type: object
properties:
comments:
type: array
items:
$ref: '#/components/schemas/Comment'
CommentLookupRsp:
type: object
properties:
comment:
$ref: '#/components/schemas/Comment'
ErrorRsp:
type: object
properties:
code:
type: string
title:
type: string
uuid:
type: string
details:
type: string
Handler:
type: object
properties:
id:
type: integer
format: uint64
package:
type: integer
format: uint64
name:
type: string
coverage:
type: number
format: double
HandlerListRsp:
type: object
properties:
handlers:
type: array
items:
$ref: '#/components/schemas/Handler'
Module:
type: object
properties:
id:
type: integer
format: uint64
name:
type: string
version:
type: string
last_check:
type: string
format: RFC3339
ModuleListRsp:
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
description:
type: string
modules:
type: integer
format: uint64
issues:
type: integer
format: uint64
comments:
type: integer
format: uint64
handlers:
type: integer
format: uint64
created:
type: string
format: RFC3339
updated:
type: string
format: RFC3339
last_check:
type: string
format: RFC3339
type:
type: string
coverage:
type: number
format: double
PackageCreateReq:
type: object
properties:
name:
type: string
url:
type: string
description:
type: string
PackageCreateRsp:
type: object
properties:
package:
$ref: '#/components/schemas/Package'
PackageDeleteRsp:
type: object
properties: {}
PackageListRsp:
type: object
properties:
packages:
type: array
items:
$ref: '#/components/schemas/Package'
PackageLookupRsp:
type: object
properties:
package:
$ref: '#/components/schemas/Package'
PackageModulesRsp:
type: object
properties:
modules:
type: array
items:
$ref: '#/components/schemas/Module'
PackageUpdateReq:
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
coverprofile:
type: string
format: bytes
PackageUpdateRsp:
type: object
properties:
package:
$ref: '#/components/schemas/Package'
tags:
- name: Pkgdash