Skip to content

Render API overview and operation pages, and keep every old URL working - #160

Draft
matthewmr-eqty wants to merge 6 commits into
feat/mic-73-openapi-loader-navfrom
feat/mic-73-openapi-pages
Draft

matthewmr-eqty wants to merge 6 commits into
feat/mic-73-openapi-loader-navfrom
feat/mic-73-openapi-pages

Conversation

@matthewmr-eqty

Copy link
Copy Markdown
Contributor

Review focus

runtime/routes/docs.astro changes for every site: a site without an openapi: page builds the same 1,771 pages as before. Read runtime/openapi/OperationPage.astro first, then routes/docs.astro and routes/openapi-file.ts. eq-tabs.ts is a separate keyboard fix that affects every docs tab strip, not only API pages.

Need

Customers reading guardian's APIs need each operation's method, path, samples, parameters and responses on its own page, and the links they already hold, including tag pages, must still land somewhere useful.

Problem

The new design drops tag pages, the downloadable file must be the service team's own bytes, and statically rendered tabs loaded with no tab stop, so keyboard users could not reach the cURL and fetch samples.

Change

Overview and operation pages render only from the model, in Equality's Badge, Tabs, TableContainer and CodeFence, with native <details> until Equality ships an Accordion. Old tag URLs redirect to the overview; the committed file is served byte for byte at <page>/openapi.json or .yaml. The demo renders the Swagger Petstore (pinned, served byte for byte) so CI exercises the whole path; it stays out of llms.txt. The README gains an "API reference" section and the design-system skill a name-table row.

Evidence

Built from the real Integrity file: overview, 35 operations, 10 tag redirects, served JSON byte-identical; a YAML source served byte-identical as .yaml. Demo build: 1,794 pages, including Petstore's 19 operations and three tag redirects; the served .yaml is identical to upstream; OAuth and API-key security render per operation; a missing file fails the build naming the page. Browser (Chromium): sidebar tag groups with method badges, right rail, tabs by click and keyboard, tag redirect. Four live astro dev cases pass. Lint, format check, build and 155 docs tests pass.

Not covered

The visual design pass is next; the pages use the plan's draft anatomy. Parameter enums and defaults are not shown yet, and samples keep {petId}-style placeholders and skip non-JSON bodies. noIndex pages are still indexed by Pagefind on main, so the example API appears in search. Only Chromium was checked; browser tests are not in CI.

Flow

/reference/<svc>/api-reference/
   ├─ index.html                 OverviewPage (model)
   ├─ operations/<slug>/         OperationPage (model + operation)
   ├─ operations/tags/<tag>/  ─▶ redirect to the overview
   └─ openapi.json | .yaml       the committed file, byte for byte

matthewmr-eqty and others added 6 commits September 24, 2026 12:49
Need: customers read each service's endpoints, parameters, responses and samples in EQTY's own components.
Problem: pages rendered from raw spec JSON would drift from the model the sidebar and twins use.
Solution: overview and operation pages render only from the model, with text-only method badges and native disclosure.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…inal file

Need: every URL customers hold today, operations and tags alike, keeps working after the switch.
Problem: tag pages disappear in the new design, and the downloadable file must be the teams' own bytes.
Solution: generated entries route to their pages, tag URLs redirect to the overview, and the source file is served as committed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Need: CI should fail when the viewer breaks, and other repos should find it instead of hand-rolling one.
Problem: without an API page in the demo, the build never exercises the fan-out, routes or served file.
Solution: an example API in the demo's sidebar, kept out of llms.txt, plus an authoring guide and a name-table row.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Need: keyboard and screen-reader users reach docs tabs, now including every API sample picker.
Problem: statically rendered tabs load with every trigger at tabindex -1, so Tab skipped the strip until a click.
Solution: on load, the selected tab becomes the strip's one tab stop, and arrow keys move within it as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…elpers

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Need: the demo should show the viewer on a real-sized API, not two operations.
Problem: the tiny fixture never exercised tags, OAuth, enums, uploads or a YAML source.
Solution: the demo serves the Swagger Petstore at a pinned commit, byte for byte and kept out of Prettier.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@matthewmr-eqty
matthewmr-eqty added this pull request to stack #161 September 24, 2026 17:26
@matthewmr-eqty
matthewmr-eqty marked this pull request as draft October 6, 2026 19:46
@matthewmr-eqty
matthewmr-eqty removed this pull request from stack #161 October 6, 2026 20:36
@matthewmr-eqty
matthewmr-eqty added this pull request to stack #191 October 6, 2026 20:36

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant