mirror of
https://github.com/rommapp/romm.git
synced 2026-11-28 17:48:31 +01:00
Every streaming route returned a bare `JSONResponse`, so none of their shapes reached the OpenAPI schema and `services/api/streaming.ts` hand-maintained a parallel copy of all eleven of them. A response-shape change was a silent frontend break with nothing to catch it. `endpoints/responses/streaming.py` declares the shapes and the routes return them, so they generate like every other endpoint. The 428 a claim raises when a container still holds an undecided memory card is declared too, through `responses=`, rather than staying an undocumented `detail` dict. The frontend types are regenerated and the hand-written interfaces become aliases onto them. The typecheck immediately found two places they had already drifted: the hand-written `PlatformCapabilities` was missing `has_memory_card`, and `LiveSessionCard` passed a possibly-undefined host username where a nullable string was expected. The termination notice had drifted on the backend side too: it records `ended_at`, `rom_id` and `rom_name`, which the first draft of the schema did not carry. Releasing a session now hands its teardown to FastAPI's `BackgroundTasks` rather than attaching it to a hand-built response, which is what lets the route return a model. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
10 lines
236 B
TypeScript
10 lines
236 B
TypeScript
/* generated using openapi-typescript-codegen -- do not edit */
|
|
/* istanbul ignore file */
|
|
/* tslint:disable */
|
|
/* eslint-disable */
|
|
export type ReleaseSessionResponse = {
|
|
status: 'released' | 'not_found';
|
|
platform: string;
|
|
};
|
|
|