docs(api): use versioned channel routes
Build ErsatzTV Image / decisions.md append-only (pull_request) Successful in 10s
Build ErsatzTV Image / Docs update reminder (pull_request) Successful in 11s
Build ErsatzTV Image / API docs in sync (OpenAPI + endpoint index) (pull_request) Successful in 8s
Build ErsatzTV Image / Formatting (changed .cs conform to .editorconfig) (pull_request) Successful in 1m14s
Build ErsatzTV Image / EF migration integrity (SQLite + MySql) (pull_request) Successful in 3m49s
Build ErsatzTV Image / Build & test (.NET) (pull_request) Successful in 7m47s
Build ErsatzTV Image / Build & push image (amd64) (pull_request) Has been skipped
Build ErsatzTV Image / Functional E2E (curl contracts) (pull_request) Successful in 6m35s

Co-Authored-By: OpenAI Codex <codex@openai.com>
This commit is contained in:
2026-07-16 15:03:53 +02:00
co-authored by OpenAI Codex
parent 7dee5194f4
commit d1a52eaa8b
@@ -6,7 +6,7 @@
## Context
The ChicoryTV Channels prototype needs runtime channel state for the **On-air** filter, live row treatment, and **Now playing** lane. The existing `GET /api/channels` endpoint returns static channel configuration and should stay cheap. Runtime state changes with wall-clock time and active streaming sessions, so it belongs in a separate pollable endpoint.
The ChicoryTV Channels prototype needs runtime channel state for the **On-air** filter, live row treatment, and **Now playing** lane. The existing `GET /api/v1/channels` endpoint returns static channel configuration and should stay cheap. Runtime state changes with wall-clock time and active streaming sessions, so it belongs in a separate pollable endpoint.
ErsatzTV has two distinct concepts:
@@ -20,7 +20,7 @@ The API should expose both concepts separately rather than blending them into on
Add a batched endpoint:
```http
GET /api/channels/state
GET /api/v1/channels/state
```
Response:
@@ -48,7 +48,7 @@ Response:
Fields:
- `channelId`: channel database id for joining with `GET /api/channels` rows.
- `channelId`: channel database id for joining with `GET /api/v1/channels` rows.
- `channelNumber`: stable display/routing number, also useful for active session checks.
- `onAir`: `true` when the channel has an active segmenter-backed or direct stream session.
- `nowPlaying`: current scheduled `PlayoutItem` by wall-clock, or `null`.
@@ -120,7 +120,7 @@ the endpoint contract.
Controller tests should verify:
- `GET /api/channels/state` routes through MediatR and returns `200 OK`.
- `GET /api/v1/channels/state` routes through MediatR and returns `200 OK`.
- The endpoint advertises a `List<ChannelStateResponseModel>` response.
Application handler tests should verify: