sse events schema for /calls
This commit is contained in:
@@ -58,6 +58,21 @@ components:
|
|||||||
x-order: 2
|
x-order: 2
|
||||||
x-label: "Details"
|
x-label: "Details"
|
||||||
|
|
||||||
|
Call:
|
||||||
|
type: object
|
||||||
|
x-resource: calls
|
||||||
|
x-primary-key: _received_at
|
||||||
|
x-display-format: "{sound}"
|
||||||
|
x-list-columns: [sound]
|
||||||
|
properties:
|
||||||
|
sound:
|
||||||
|
type: string
|
||||||
|
enum: [woof, meow, coo]
|
||||||
|
x-label: "Sound"
|
||||||
|
x-order: 1
|
||||||
|
x-filterable: false
|
||||||
|
required: [sound]
|
||||||
|
|
||||||
Parent:
|
Parent:
|
||||||
type: object
|
type: object
|
||||||
x-resource: parents
|
x-resource: parents
|
||||||
@@ -369,6 +384,19 @@ components:
|
|||||||
$ref: '#/components/schemas/ErrorBody'
|
$ref: '#/components/schemas/ErrorBody'
|
||||||
|
|
||||||
paths:
|
paths:
|
||||||
|
/calls:
|
||||||
|
get:
|
||||||
|
summary: Stream random animal sounds via SSE
|
||||||
|
operationId: stream_calls
|
||||||
|
x-sse: true
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: SSE stream of random animal sounds
|
||||||
|
content:
|
||||||
|
text/event-stream:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/Call'
|
||||||
|
|
||||||
/parents:
|
/parents:
|
||||||
get:
|
get:
|
||||||
summary: List parents (paginated)
|
summary: List parents (paginated)
|
||||||
@@ -984,24 +1012,6 @@ paths:
|
|||||||
$ref: '#/components/responses/ValidationError'
|
$ref: '#/components/responses/ValidationError'
|
||||||
'500':
|
'500':
|
||||||
$ref: '#/components/responses/InternalServerError'
|
$ref: '#/components/responses/InternalServerError'
|
||||||
/calls:
|
|
||||||
get:
|
|
||||||
summary: Stream random animal sounds via SSE
|
|
||||||
operationId: stream_calls
|
|
||||||
x-sse: true
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
description: SSE stream of random animal sounds
|
|
||||||
content:
|
|
||||||
text/event-stream:
|
|
||||||
schema:
|
|
||||||
type: object
|
|
||||||
required: [sound]
|
|
||||||
properties:
|
|
||||||
sound:
|
|
||||||
type: string
|
|
||||||
enum: [woof, meow, coo]
|
|
||||||
description: Random animal sound
|
|
||||||
|
|
||||||
/appointments/{id}:
|
/appointments/{id}:
|
||||||
get:
|
get:
|
||||||
|
|||||||
Reference in New Issue
Block a user