docs: add Scalar API reference page#173
docs: add Scalar API reference page#173sachiniyer merged 1 commit intochore/sync-openapi-and-depsfrom
Conversation
Add a static HTML page that renders the OpenAPI spec using Scalar's CDN-hosted API reference component. AI agent and client button are disabled for a clean, focused documentation experience. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This stack of pull requests is managed by Graphite. Learn more about stacking. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
| <script src="https://cdn.jsdelivr.net/npm/@scalar/api-reference"></script> | ||
| <script> | ||
| Scalar.createApiReference("#app", { | ||
| url: "./openapi.json", |
There was a problem hiding this comment.
🔴 Relative URL ./openapi.json points to non-existent file in docs/api/
The Scalar API reference is configured with url: "./openapi.json", which resolves relative to the HTML file's location (docs/api/). However, no openapi.json exists in docs/api/ — the only openapi.json in the repository is at the repo root (openapi.json). When this page is served, the fetch for the OpenAPI spec will 404 and the API reference will fail to render. The URL should likely be ../../openapi.json or the openapi.json file should be copied/symlinked into docs/api/.
Prompt for agents
In docs/api/index.html at line 13, the relative URL ./openapi.json resolves to docs/api/openapi.json, but the actual openapi.json file is at the repository root. Either:
1. Change the URL on line 13 to ../../openapi.json (i.e. url: "../../openapi.json") to point to the repo-root file, OR
2. Copy or symlink openapi.json into docs/api/, OR
3. Move or adjust the hosting so that openapi.json is served alongside this HTML file.
The correct fix depends on how docs/api/ is deployed (e.g. GitHub Pages, a static server, etc.).
Was this helpful? React with 👍 or 👎 to provide feedback.

Add a static HTML page that renders the OpenAPI spec using Scalar's
CDN-hosted API reference component. AI agent and client button are
disabled for a clean, focused documentation experience.
Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com