Skip to content

feat: guard generated docs against /latest regressions (DOC-206)#1136

Merged
sybohy merged 2 commits into
mainfrom
doc-206-latest-guard
Jun 10, 2026
Merged

feat: guard generated docs against /latest regressions (DOC-206)#1136
sybohy merged 2 commits into
mainfrom
doc-206-latest-guard

Conversation

@sybohy

@sybohy sybohy commented Jun 10, 2026

Copy link
Copy Markdown
Member

Problem

@seamapi/types@1.879.0 (#1134) reintroduced docs.seam.co/latest into the generated API object pages — regressing the cleanup that shipped in 1.878.1 (DOC-199). Relying on the upstream package staying /latest-free has now failed once.

Fix

Add a post-generate sanitization step (Phase G in mintlify-codegen/generate.ts) that strips docs.seam.co/latestdocs.seam.co from the generated output (openapi.json + api/**/*.mdx) after every generate/generate:mintlify. This keeps the docs /latest-free regardless of the @seamapi/types version. The docs serve at root; the existing /latest/:path* redirect handles old inbound URLs.

This regen (run against the dirty 1.879.0) confirms the guard works: it stripped 26 files and the output has zero docs.seam.co/latest.

Verification

  • npm run typecheck
  • npm run validate:mintlify
  • mint broken-links --check-anchors --check-redirects → no broken links ✓
  • End-to-end guard test: injected /latest into a page, regenerated, guard reported "Sanitized 1" and the page came out clean.

Closes DOC-206. Complements DOC-199 (upstream re-fix in @seamapi/types).

🤖 Generated with Claude Code

@seamapi/types@1.879.0 (#1134) reintroduced docs.seam.co/latest into the
generated API object pages after the 1.878.1 cleanup. Rather than depend on the
upstream package staying clean, add a post-generate sanitization step
(Phase G in mintlify-codegen/generate.ts) that strips `docs.seam.co/latest` ->
`docs.seam.co` from openapi.json + api/**/*.mdx after every generate. The docs
serve at root (no /latest); a /latest/:path* redirect handles old inbound URLs.

Regenerated output is now /latest-free (guard stripped 26 files against 1.879.0).
Verified: typecheck, validate:mintlify, and broken-links --check-anchors
--check-redirects all pass.

Closes DOC-206. Complements DOC-199 (upstream re-fix).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@sybohy sybohy requested a review from a team as a code owner June 10, 2026 22:27
@mintlify

mintlify Bot commented Jun 10, 2026

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
seam 🟢 Ready View Preview Jun 10, 2026, 10:30 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@sybohy sybohy merged commit c113d3f into main Jun 10, 2026
10 checks passed
@sybohy sybohy deleted the doc-206-latest-guard branch June 10, 2026 22:37
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.

2 participants