OAPI: define Worker schema as extension of WorkerSummary

This makes their relation clearer. This also moves the `version` field
into the `WorkerSummary` schema.
This commit is contained in:
Sybren A. Stüvel 2022-05-31 15:29:30 +02:00
parent 66edc5c4d3
commit d82333635a

View File

@ -1424,43 +1424,33 @@ components:
# type: string # type: string
# format: date-time # format: date-time
# description: Last time this worker was seen by the Manager. # description: Last time this worker was seen by the Manager.
required: [id, nickname, status]
Worker:
type: object
description: All information about a Worker
properties:
"id": { type: string, format: uuid }
"nickname": { type: string }
"status": { $ref: "#/components/schemas/WorkerStatus" }
"status_requested": { $ref: "#/components/schemas/WorkerStatus" }
# These will be implemented soon:
# "task_id":
# type: string
# format: uuid
# description: The worker's current/last-worked-on task.
# "last_seen":
# type: string
# format: date-time
# description: Last time this worker was seen by the Manager.
"ip_address": { type: string, description: IP address of the Worker }
"platform":
type: string
description: Operating system of the Worker
"version": "version":
type: string type: string
description: Version of Flamenco this Worker is running description: Version of Flamenco this Worker is running
"supported_task_types": required: [id, nickname, status, "version"]
type: array
items: { type: string } Worker:
required: description: All information about a Worker
- id allOf:
- nickname - $ref: "#/components/schemas/WorkerSummary"
- status - properties:
- ip_address "ip_address":
- platform type: string
- version description: IP address of the Worker
- supported_task_types "platform":
type: string
description: Operating system of the Worker
"supported_task_types":
type: array
items: { type: string }
required:
- id
- nickname
- status
- ip_address
- platform
- version
- supported_task_types
securitySchemes: securitySchemes:
worker_auth: worker_auth: