feat(api): optional refresh param on GET /api/graphics-elements
Review SHOULD-FIX (#145): the SPA graphics picker could go stale because Blazor ran RefreshGraphicsElements (disk->DB sync) before listing, while the API endpoint never refreshed — a newly added .yml would not appear. GET /api/graphics-elements?refresh=true now sends RefreshGraphicsElements before the list query; default false leaves existing callers untouched. The playback troubleshooting screen passes refresh=true. Controller tests cover refresh-iff-true ordering; regenerated OpenAPI v1.json (endpoint index and generated TS schemas unchanged - query params are not part of either). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -4874,7 +4874,17 @@
|
||||
"Graphics Elements"
|
||||
],
|
||||
"summary": "Get all graphics elements",
|
||||
"description": "Returns all graphics elements. Pass refresh=true to first re-sync the on-disk graphics element definitions into the database (matching the legacy Blazor behavior) so newly added files appear.",
|
||||
"operationId": "GetGraphicsElements",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "refresh",
|
||||
"in": "query",
|
||||
"schema": {
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
|
||||
Reference in New Issue
Block a user