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
12 lines
325 B
JavaScript
12 lines
325 B
JavaScript
// 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);
|
|
})();
|