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