pkgdash/proto/apidocs.swagger.yaml

520 lines
16 KiB
YAML

# Generated with protoc-gen-go-micro
openapi: 3.0.3
info:
title: Pkgdash API
version: 0.0.1
paths:
/v1/comments/{id}:
get:
tags:
- Pkgdash
operationId: CommentLookup
parameters:
- name: id
in: path
required: true
schema:
type: integer
format: uint64
- 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/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:
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:
Comment:
type: object
properties:
id:
type: integer
format: uint64
package:
type: integer
format: uint64
comment:
type: string
created:
type: string
format: RFC3339
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:
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:
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
coverprofile:
type: string
format: bytes
PackageUpdateRsp:
type: object
properties:
package:
$ref: '#/components/schemas/Package'
tags:
- name: Pkgdash