fix(ci): make generated endpoint pages pass CI and read correctly in the sidebar - #477
Merged
Merged
Conversation
Contributor
|
Preview deployment for your docs. Learn more about Mintlify Previews.
|
martzoukos
enabled auto-merge
August 11, 2026 07:51
Auto-generated endpoint pages have failed CI since the July SEO audit added check_frontmatter.py: the generator writes only an `openapi:` key, while every built page must declare a self-referential trailing-slash canonical. The stub now derives that canonical from the same page path it hands docs.json, so the two cannot drift. The sync workflow also left sitemap.xml stale — it is generated from docs.json navigation, which the generator mutates — so the "Sitemap up to date" gate failed on the same PRs. Regenerate it after page generation and stage it. Verified by running the generator against the current live spec: it reproduces the four /v2 pages from PR #476 with correct canonicals, and the frontmatter, redirect-destination, and sitemap checks all pass. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Mintlify falls back to the OpenAPI summary when a page declares no title, so each /v2 page rendered under the same sidebar label as its /v1 counterpart — two "Retrieve a check" entries, with the v2 one stranded at the bottom of the group behind the SSL monitor pages. Give the version-suffixed pages an explicit "… (v2)" title and move each one directly after the /v1 page it supersedes. Check-group pages already carry a "(V2)" marker in their spec summary and keep it. The generator does both from now on, so the next versioned endpoint lands correctly without a follow-up. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
martzoukos
force-pushed
the
martzoukos/fix-endpoint-page-generator
branch
from
August 11, 2026 07:55
4a3d09f to
d6ebd72
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three gaps in the API-spec sync automation, all visible on #476 (the
/v2/checkspages).1. Missing canonical — CI failure
detect-new-endpoints.mjswrites stub frontmatter with only anopenapi:key, but since the July SEO audit addedcheck_frontmatter.pyevery built page must declare a self-referential trailing-slash canonical. The stub now derives it from the same page path it handsdocs.json, so the two cannot drift.SITE_BASEcarries a comment pointing atBASEincheck_frontmatter.py.2. Stale sitemap — CI failure
sitemap.xmlis generated fromdocs.jsonnavigation, which the generator mutates — so the "Sitemap up to date" gate failed on the same PRs, hidden behind the frontmatter failure. The workflow now regenerates it after page generation and stages it.3. Duplicate sidebar labels, stranded pages
Mintlify falls back to the OpenAPI summary when a page declares no title.
getV2ChecksId's summary is literally "Retrieve a check", so the sidebar showed two identical "Retrieve a check" entries — andaddToDocsJsonappends, so the v2 pair sat at the bottom of "Checks and Monitors" behind the SSL monitor pages.Version-suffixed pages now get an explicit
title: '… (v2)'and are inserted directly after the/v1page they supersede. Pages whose summary already names the version (the check-group ones end in(V2)) are left alone rather than becoming "… (V2) (v2)".Backfilled onto the nine existing
*-v2pages: five gained a title, six moved next to their sibling. Check Sessions was already ordered this way by hand — that pattern is now what the generator produces.Before / after in "Checks and Monitors":
Verification
Deleted the four
/v2pages from #476 and their nav entries, then re-ran the patched generator on a clean tree. It reproduces the committed state byte-for-byte —git statuscomes back empty — so what ships here is exactly what the automation will produce next time.All three static gates pass:
🤖 Generated with Claude Code