Show the API reference with Redoc

Replace the hand-built reference page with Redoc rendering the generated
OpenAPI document. The bundle is fetched by package.nix (pinned hash) and
served from the UI's own address; only that page gets a style nonce and
worker-src blob: in its CSP.

The spec now explains authentication, saved-not-applied, ETags (If-Match,
409) and errors, documents the ETag header, gives each operation a curl
sample, and no longer names MCP tools. Area GETs no longer emit
"parameters": null, which Redoc could not render.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AeFqV9dZrK6nipHkPfyM4F
This commit is contained in:
2026-11-01 22:01:30 +01:00
co-authored by Claude Sonnet 5.5
parent 64e08fb485
commit 876080d3f5
14 changed files with 245 additions and 201 deletions
+1
View File
@@ -0,0 +1 @@
body { margin: 0; }
+11
View File
@@ -0,0 +1,11 @@
// Shows the OpenAPI document with Redoc (redoc.standalone.js).
(function () {
var el = document.getElementById("redoc");
Redoc.init(el.dataset.spec, {
nonce: el.dataset.nonce,
hideDownloadButton: false,
expandResponses: "200",
pathInMiddlePanel: true,
sortPropsAlphabetically: false,
}, el);
})();