Skip to content

docs: add api-reference title checker script - #99

Merged
EthanThatOneKid merged 2 commits into
mainfrom
check-api-titles
Aug 5, 2026
Merged

docs: add api-reference title checker script#99
EthanThatOneKid merged 2 commits into
mainfrom
check-api-titles

Conversation

@EthanThatOneKid

Copy link
Copy Markdown
Contributor

What

Adds scripts/check-api-reference-titles.mjs, exposed as npm run check:api-titles. It fetches both OpenAPI specs wired into docs.json (api.wazoo.dev/openapi.json + worlds-api.wazoo.dev/openapi.json), walks every /api-reference page in the docs sitemap, extracts the rendered <h1> title, matches each page to its spec operation, and compares against the operation's declared title (x-mint.metadata.titlesummary → operationId-derived fallback).

Findings classes

Kind Meaning
DERIVED Operation has no summary/x-mint override — title is at Mintlify's mercy (e.g. "Get api keys")
LOWERCASE Rendered title has words the declared title capitalizes ("api" vs "API")
MISMATCH Rendered title differs from the declared title
UNMATCHED Page matched no operation in either spec

Exits non-zero on any finding, so it can be wired into CI (e.g. alongside mintlify broken-links).

Verified

  • Production specs now: 6 DERIVED (worlds-api pages with no override — the exact "Get api keys" bug class from issue Docs review round 2: apply style-audit nits across all pages #18) + 4 MISMATCH (stale wazoo-api collection pages whose titles no longer match the spec).
  • Post-fix specs (simulated): the same 6 pages flip to LOWERCASE ("Get api keys" vs declared "List API keys"), confirming the check catches the bug until docs re-deploy.
  • Exit code 1 when findings exist, 0 when clean. npm run format:check passes.

EthanThatOneKid and others added 2 commits August 4, 2026 16:47
Fetches both OpenAPI specs (wazoo-api, worlds-api) and walks every
/api-reference page on docs.wazoo.dev, comparing the rendered title to
the operation's declared title (x-mint.metadata.title -> summary).
Reports DERIVED (no override), LOWERCASE, and MISMATCH findings and
exits non-zero so it can run in CI. Expose as npm run check:api-titles.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
The previous slug-overlap matching mis-attributed colliding worlds-api
pages (get-worlds, post-worlds, patch-worlds, delete-worlds) to
wazoo-api operations, since both specs share operationIds. Parse the
authoritative (spec-url, method, path) source line from each page's
Markdown variant and look up the exact operation. Also report
operations present in the specs but missing from the docs sitemap.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
@EthanThatOneKid
EthanThatOneKid merged commit 30a31f8 into main Aug 5, 2026
4 checks passed
@EthanThatOneKid
EthanThatOneKid deleted the check-api-titles branch August 5, 2026 00:28
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