Skip to content

fix: support versioned API URL aliases - #110

Merged
hdcodedev merged 1 commit into
mainfrom
fix/api-version-redirects
Oct 17, 2026
Merged

hdcodedev merged 1 commit into
mainfrom
fix/api-version-redirects

Conversation

@hdcodedev

Copy link
Copy Markdown
Member

Summary

Links such as /api/3.0.0/ currently return 404. Add permanent redirects from /api/<version> and /api/<version>/ to the existing /<version>/api page for every registered documentation version, including snapshot and older releases.

Generate the aliases from the version registry so the app's other /api/ endpoints keep their routes. Preserve query strings.

Validation

  • Passed bash scripts/test-docs-release-links-contract.sh.
  • Passed npm run build in docs-app with locked Next.js 16.3.6, including TypeScript checks.
  • Checked the production server: both alias forms return HTTP 308 for all 8 registered versions; the alias and canonical 3.0.0 URLs resolve to HTTP 200; query strings are preserved; an unregistered API path stays 404.
  • Checked the production redirect manifest: /api/ redirects cover only registered versions.
  • npx eslint next.config.ts could not start because the repository's TypeScript 7 dependency is unsupported by typescript-eslint. Dependency files are unchanged.

To verify locally from the repository root:

npm ci --prefix docs-app
npm run build
npm start -- --port 3137

Open http://localhost:3137/api/3.0.0/ and http://localhost:3137/api/3.0.0. Both should redirect to /3.0.0/api and show the API documentation page. Repeat with /api/snapshot/ and an older registered version. A query such as ?search=LineChart should survive the redirect.

@vercel

vercel Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
charts.hdcode.dev Ready Ready Preview Oct 17, 2026 12:53am UTC

@hdcodedev
hdcodedev merged commit 16f0b46 into main Oct 17, 2026
3 checks passed
@hdcodedev
hdcodedev deleted the fix/api-version-redirects branch October 17, 2026 00:54

This branch was successfully deployed

1 active deployment
Preview — 2ef6004f Deployed Oct 17, 2026 by vercel[bot]
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