sse sub resource
This commit is contained in:
@@ -60,7 +60,6 @@ components:
|
||||
|
||||
Call:
|
||||
type: object
|
||||
x-resource: calls
|
||||
x-primary-key: _received_at
|
||||
x-display-format: "{sound}"
|
||||
x-list-columns: [sound]
|
||||
@@ -75,7 +74,6 @@ components:
|
||||
|
||||
Parent:
|
||||
type: object
|
||||
x-resource: parents
|
||||
x-primary-key: id
|
||||
x-display-format: "{name}"
|
||||
x-list-columns: [name, email, phone]
|
||||
@@ -114,7 +112,6 @@ components:
|
||||
|
||||
Vet:
|
||||
type: object
|
||||
x-resource: vets
|
||||
x-primary-key: id
|
||||
x-display-format: "Dr. {name}"
|
||||
x-list-columns: [name, specialty, email, phone]
|
||||
@@ -158,7 +155,6 @@ components:
|
||||
|
||||
Treatment:
|
||||
type: object
|
||||
x-resource: treatments
|
||||
x-primary-key: id
|
||||
x-display-format: "{label}"
|
||||
x-list-columns: [label, description]
|
||||
@@ -189,7 +185,6 @@ components:
|
||||
|
||||
Pet:
|
||||
type: object
|
||||
x-resource: pets
|
||||
x-primary-key: id
|
||||
x-display-format: "{name} – #{id}"
|
||||
x-list-columns: [name, species, age, weight, birthDate, parents]
|
||||
@@ -260,7 +255,6 @@ components:
|
||||
|
||||
Appointment:
|
||||
type: object
|
||||
x-resource: appointments
|
||||
x-primary-key: id
|
||||
x-display-format: "Appt #{id} – {date}"
|
||||
x-list-columns: [date, pet, vet, treatment, notes]
|
||||
@@ -295,7 +289,7 @@ components:
|
||||
$ref: '#/components/schemas/Pet'
|
||||
x-fk:
|
||||
resource: pets
|
||||
x-order: 3
|
||||
x-order: 4
|
||||
x-label: "Pet"
|
||||
x-description: "Select a pet"
|
||||
x-filterable: true
|
||||
@@ -304,7 +298,7 @@ components:
|
||||
x-fk:
|
||||
resource: vets
|
||||
prefetch: true
|
||||
x-order: 4
|
||||
x-order: 5
|
||||
x-label: "Veterinarian"
|
||||
x-description: "Select a veterinarian"
|
||||
x-filterable: true
|
||||
@@ -313,13 +307,13 @@ components:
|
||||
x-fk:
|
||||
resource: treatments
|
||||
prefetch: true
|
||||
x-order: 5
|
||||
x-order: 6
|
||||
x-label: "Treatment"
|
||||
x-description: "Select a treatment"
|
||||
x-filterable: true
|
||||
metadata:
|
||||
$ref: '#/components/schemas/Metadata'
|
||||
x-order: 4
|
||||
x-order: 7
|
||||
x-label: "Metadata"
|
||||
required: [id, date, pet, vet, treatment]
|
||||
|
||||
@@ -384,19 +378,6 @@ 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)
|
||||
@@ -945,6 +926,23 @@ paths:
|
||||
$ref: '#/components/responses/ValidationError'
|
||||
'500':
|
||||
$ref: '#/components/responses/InternalServerError'
|
||||
/pets/{id}/calls:
|
||||
get:
|
||||
summary: Stream animal sounds via SSE, scoped to a pet's species
|
||||
operationId: stream_calls
|
||||
x-sse: true
|
||||
parameters:
|
||||
- name: id
|
||||
in: path
|
||||
required: true
|
||||
schema: {type: integer}
|
||||
responses:
|
||||
'200':
|
||||
description: SSE stream of random animal sounds
|
||||
content:
|
||||
text/event-stream:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Call'
|
||||
|
||||
/appointments:
|
||||
get:
|
||||
|
||||
Reference in New Issue
Block a user