sse events schema for /calls

This commit is contained in:
2026-06-18 01:52:55 +05:30
parent 083fb6923d
commit 4a7a76e330

View File

@@ -58,6 +58,21 @@ components:
x-order: 2
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:
type: object
x-resource: parents
@@ -369,6 +384,19 @@ components:
$ref: '#/components/schemas/ErrorBody'
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:
get:
summary: List parents (paginated)
@@ -984,24 +1012,6 @@ paths:
$ref: '#/components/responses/ValidationError'
'500':
$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}:
get: