Playout read API — unblocks #87 (Playouts screen).
Endpoints
GET /api/playouts — paged list (query/pageNum/pageSize) via existing GetPagedPlayouts; list items carry id, channelNumber/Name, scheduleKind/Name, dailyRebuildTime, nullable buildStatus (#100, #107)
GET /api/playouts/{id}/items — paged future items (showFiller/pageNum/pageSize) via GetFuturePlayoutItemsById; nullable fillerKind for gaps; 404 for unknown playout id (ScheduleController precedent) with OpenApiErrorResponseContractTests entry (#101)
- GET /api/playouts — paged list over GetPagedPlayouts (query/pageNum/pageSize), list DTO with buildStatus (#100, #107)
- GET /api/playouts/{id}/items — paged future items + UNSCHEDULED gaps over GetFuturePlayoutItemsById; 404 ProblemDetails for unknown playout (matches /api/schedules/{id}/items precedent) (#101)
- buildStatus {lastBuild, success, message} on GET /api/playouts/{id} (BuildStatus now included by GetPlayoutByIdHandler) (#107)
- GET /api/playouts/warnings/count — failed-build count for the warnings badge (#107)
- POST /api/playouts/reset-all — 202 Accepted, wraps ResetAllPlayouts (#110)
- POST /api/channels/{channelNumber}/playout/reset — optional ?mode= override; default branches by ScheduleKind (Classic→Refresh, others→Reset) to match Blazor semantics (#110)
- Option<FillerKind>→FillerKind? projection uses MatchUnsafe (Match throws on null-returning branch; idiom per Health/Mapper.cs)
- Tests: controller unit tests (routes, projections, 404s, reset-mode defaults), OpenAPI ProblemDetails contract entry for /api/playouts/{id}/items get 404
- Regenerated wwwroot/openapi/v1.json
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
timothy
merged commit abd8ca34c9 into main2026-07-03 22:50:06 +02:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Playout read API — unblocks #87 (Playouts screen).
Endpoints
GET /api/playouts— paged list (query/pageNum/pageSize) via existingGetPagedPlayouts; list items carry id, channelNumber/Name, scheduleKind/Name, dailyRebuildTime, nullable buildStatus (#100, #107)GET /api/playouts/{id}/items— paged future items (showFiller/pageNum/pageSize) viaGetFuturePlayoutItemsById; nullable fillerKind for gaps; 404 for unknown playout id (ScheduleController precedent) with OpenApiErrorResponseContractTests entry (#101)GET /api/playouts/warnings/count(#107)POST /api/playouts/reset-all— 202 Accepted →ResetAllPlayouts(#110)POST /api/channels/{channelNumber}/playout/reset— optionalmodeparam, defaulting per ScheduleKind (Classic→Refresh, others→Reset), matching Playouts.razor (#110)GET /api/playouts/{id}now includes buildStatus (.Include(BuildStatus)+PlayoutResponseModel.From) (#107)Notes
49a6d4eeaudited, rebased onto main, fixed: nonexistentOption<FillerKind>.ToNullable()→MatchUnsafe(Health/Mapper idiom);ChannelControllerTests.ResetPlayoutsignature break; added mode-defaulting + 404 + DailyRebuildTime test coverage.#nullable enable, so OpenAPI wrongly documented buildStatus/scheduleFile non-nullable — would have broken SPA typegen. Nit fixed:Name=ResetAllPlayouts. Deferred as backlog notes: lightweight exists-check for the items 404 pre-check; pageSize clamping (matches existing convention)../scripts/update-openapi.shre-run (regen authoritative); build 0 errors;TZ=UTCtests 289/289 green.fixes #100, fixes #101, fixes #107, fixes #110
🤖 Generated with Claude Code