Skip to content
quarry View Ticket
Login

View Ticket

2026-09-24
00:52 • Ticket [c164c63687] Serve an interactive OpenAPI page instead of the flat API doc status still Open with 1 other change artifact: 0a8dd6bd8c user: zeitgeist
2026-08-19
12:10 • Ticket [c164c63687]: 1 change artifact: bbdef646fe user: dmestas
11:04 • Ticket [c164c63687]: 2 changes artifact: 67ca9043e4 user: dmestas
2026-08-18
19:56 • New ticket [c164c63687]. artifact: 7090f256f1 user: dmestas

Serve an interactive OpenAPI page instead of the flat API doc

Openc164c63687d04d5af47842e2de6c0fbdc2ad0e30Created 104.1 days agoUpdated 67.9 days ago
Description2026-08-18 19:56:50
`/docs` renders the registry as flat markdown. The registry already emits a real OpenAPI document (0001 §9: one registry serves HTML, JSON and OpenAPI), so the data for a browsable, try-it page exists — only the presentation is missing. dagnats does this well and is worth copying from.

## The thing to decide first

Every mainstream renderer — Swagger UI, Redoc, Scalar, Elements — is a large JavaScript bundle. quarry allows exactly ONE script, the vendored Datastar module, and no external hosts at all (the privacy page states that as a fact about this software). So this is not a "pick a library" task; it is a choice between:

- **Vendor a renderer.** Self-contained, no external host, but it is a second script and a large one, and it makes the one-script rule a two-script rule with no obvious stopping point after that. - **Render it server-side.** Expand the doc page into per-operation sections with parameters, schemas, and example requests, generated from the same registry data. No new script, and it works with JavaScript off — but "try it" then means a form that posts to the real endpoint rather than a client-side console. - **Serve the spec and stop.** Publish `/openapi.json` and let readers point their own tooling at it. Smallest possible change, and arguably the most useful for anyone actually integrating.

The third is worth doing regardless and immediately — a machine-readable spec at a stable URL costs nothing and is what an integrator actually wants. The second is the one that fits this codebase. Recommend both, and treat vendoring a renderer as a deliberate exception to be argued for separately rather than smuggled in with a UI ticket.