OAPI: add SocketIOSubscription
type for managing SocketIO rooms
A client can send a `SocketIOSubscription` object with the `/subscription` event type, in order to manage the subscriptions to job-related updates. Subscribing to a job means receiving updates to its tasks. General job updates are sent to all clients anyway. This commit only contains the OpenAPI YAML change, to see if it works well to separate such commits into three parts: - OpenAPI definition change. - Regenerated code changes. - Hand-written code changes.
This commit is contained in:
parent
d6c257d396
commit
24941142b0
@ -1056,6 +1056,32 @@ components:
|
||||
"priority": { type: integer, default: 50 }
|
||||
required: [id, updated, status, type, priority]
|
||||
|
||||
SocketIOSubscription:
|
||||
type: object
|
||||
description: >
|
||||
Send by SocketIO clients as `/subscription` event type, to manage their
|
||||
subscription to job updates. Clients always get job updates, but for
|
||||
task updates or task logs they need to explicitly subscribe. For
|
||||
simplicity, clients can only subscribe to one job (to get task updates
|
||||
for that job) and one task's log at a time.
|
||||
properties:
|
||||
"op": { $ref: "#/components/schemas/SocketIOSubscriptionOperation" }
|
||||
"type": { $ref: "#/components/schemas/SocketIOSubscriptionType" }
|
||||
"uuid":
|
||||
type: string
|
||||
format: uuid
|
||||
description: UUID of the thing to subscribe to / unsubscribe from.
|
||||
required: [op, type, uuid]
|
||||
|
||||
SocketIOSubscriptionOperation:
|
||||
type: string
|
||||
enum: [subscribe, unsubscribe]
|
||||
|
||||
SocketIOSubscriptionType:
|
||||
type: string
|
||||
enum: [job]
|
||||
description: What kind of thing to subscribe to / unsubscribe from.
|
||||
|
||||
securitySchemes:
|
||||
worker_auth:
|
||||
description: Username is the worker ID, password is the secret given at worker registration.
|
||||
|
Loading…
x
Reference in New Issue
Block a user