debian-forge-composer/internal/worker/api/openapi.yml
Lars Karlitski 783a88d8cc worker/api: give operations simpler names
The code generator uses the `operationID` field to generate server
handlers, client functions, and types. Use simpler names to make the
generated code easier to read.
2020-09-11 14:23:24 +01:00

134 lines
3 KiB
YAML

openapi: 3.0.0
info:
title: worker
version: '1.0'
servers: []
paths:
/status:
get:
summary: status
tags: []
responses:
'200':
description: OK
headers: {}
content:
application/json:
schema:
type: object
properties:
status:
type: string
enum:
- OK
required:
- status
operationId: GetStatus
description: Simple status handler to check whether the service is up.
/jobs:
post:
summary: create-job
tags: []
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
additionalProperties: false
properties:
id:
type: string
format: uuid
manifest: {}
targets:
type: array
items: {}
required:
- id
- manifest
- targets
operationId: PostJob
requestBody:
content:
application/json:
schema:
type: object
properties: {}
parameters: []
'/jobs/{job_id}':
parameters:
- schema:
type: string
name: job_id
in: path
required: true
get:
summary: get-job
tags: []
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
id:
type: string
format: uuid
canceled:
type: boolean
required:
- id
- canceled
operationId: GetJob
patch:
summary: update-job
tags: []
responses: {}
operationId: UpdateJob
requestBody:
content:
application/json:
schema:
type: object
properties:
status:
type: string
enum:
- WAITING
- RUNNING
- FINISHED
- FAILED
result: {}
required:
- status
- result
'/jobs/{job_id}/artifacts/{name}':
parameters:
- schema:
type: string
name: job_id
in: path
required: true
- schema:
type: string
name: name
in: path
required: true
post:
summary: add-image
tags: []
responses:
'200':
description: OK
operationId: PostJobArtifact
requestBody:
content:
application/octet-stream:
schema:
type: string
components:
schemas: {}