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:
@@ -0,0 +1 @@
|
||||
body { margin: 0; }
|
||||
@@ -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);
|
||||
})();
|
||||
Reference in New Issue
Block a user