Implements #37 / REST API #2d for playout create/delete.
Added GET /api/playouts/{id}, POST /api/playouts, and DELETE /api/playouts/{id}.
POST /api/playouts uses a stable request DTO with channelId and programScheduleId, delegates to CreateClassicPlayout, returns 201 Created, Location: /api/playouts/{id}, and a stable PlayoutResponseModel body.
DELETE /api/playouts/{id} delegates to DeletePlayout and returns 204 No Content.
Missing channel/schedule/playout now maps to NotFoundError so REST helpers return 404 ProblemDetails; business validation remains 422 ProblemDetails.
Controller is protected with the existing API-key write filter convention.
Regenerated static OpenAPI v1.json so 404/422 response bodies match ProblemDetails.
Tests
LSP diagnostics: clean for changed C# files.
scripts/update-openapi.sh
dotnet build ErsatzTV.sln
TZ=UTC dotnet test ErsatzTV.sln -v normal -> 223 passed, 0 failed.
Review
Adversarial review found one real test gap: the missing-schedule handler test was hitting the missing-channel branch. Fixed by seeding a valid channel before asserting the missing schedule path.
## Summary
Implements #37 / REST API #2d for playout create/delete.
- Added `GET /api/playouts/{id}`, `POST /api/playouts`, and `DELETE /api/playouts/{id}`.
- `POST /api/playouts` uses a stable request DTO with `channelId` and `programScheduleId`, delegates to `CreateClassicPlayout`, returns `201 Created`, `Location: /api/playouts/{id}`, and a stable `PlayoutResponseModel` body.
- `DELETE /api/playouts/{id}` delegates to `DeletePlayout` and returns `204 No Content`.
- Missing channel/schedule/playout now maps to `NotFoundError` so REST helpers return `404 ProblemDetails`; business validation remains `422 ProblemDetails`.
- Controller is protected with the existing API-key write filter convention.
- Regenerated static OpenAPI `v1.json` so 404/422 response bodies match `ProblemDetails`.
## Tests
- LSP diagnostics: clean for changed C# files.
- `scripts/update-openapi.sh`
- `dotnet build ErsatzTV.sln`
- `TZ=UTC dotnet test ErsatzTV.sln -v normal` -> 223 passed, 0 failed.
## Review
Adversarial review found one real test gap: the missing-schedule handler test was hitting the missing-channel branch. Fixed by seeding a valid channel before asserting the missing schedule path.
No DB model changes; no migrations required.
fixes #37
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.
Summary
Implements #37 / REST API #2d for playout create/delete.
GET /api/playouts/{id},POST /api/playouts, andDELETE /api/playouts/{id}.POST /api/playoutsuses a stable request DTO withchannelIdandprogramScheduleId, delegates toCreateClassicPlayout, returns201 Created,Location: /api/playouts/{id}, and a stablePlayoutResponseModelbody.DELETE /api/playouts/{id}delegates toDeletePlayoutand returns204 No Content.NotFoundErrorso REST helpers return404 ProblemDetails; business validation remains422 ProblemDetails.v1.jsonso 404/422 response bodies matchProblemDetails.Tests
scripts/update-openapi.shdotnet build ErsatzTV.slnTZ=UTC dotnet test ErsatzTV.sln -v normal-> 223 passed, 0 failed.Review
Adversarial review found one real test gap: the missing-schedule handler test was hitting the missing-channel branch. Fixed by seeding a valid channel before asserting the missing schedule path.
No DB model changes; no migrations required.
fixes #37