Skip to content

docs: add API versioning strategy guide#128

Merged
PAMulligan merged 1 commit into
mainfrom
24-add-api-versioning-strategy-guide
Jun 13, 2026
Merged

docs: add API versioning strategy guide#128
PAMulligan merged 1 commit into
mainfrom
24-add-api-versioning-strategy-guide

Conversation

@PAMulligan

Copy link
Copy Markdown
Contributor

Summary

Adds docs/api-development/api-versioning.md, a guide to versioning a Nerva/Hono API and evolving it without breaking consumers. Nerva ships an opinionated default (URL prefix, /api/v1/); this guide explains that default, the alternatives, and how to evolve safely whichever you pick.

What it covers

  • Nerva's default — URL prefix, quoting the api.versioning block of pipeline.config.json (strategy: "url-prefix", currentVersion: "v1", deprecationHeaderEnabled: true) and why URL-prefix is the default
  • API version vs. release version — the contract (v1) vs. the deployed build (APP_VERSION)
  • All four strategies — URL prefix, custom header, content negotiation, query parameter — in a trade-off table, then a working Hono implementation for each (sub-app mounting, basePath, version-resolving middleware, Accept media-type negotiation with Vary)
  • Deprecation and Sunset headersDeprecation (RFC 9745) and Sunset (RFC 8594), gated by deprecationHeaderEnabled, with a Hono middleware
  • Breaking vs. non-breaking changes — two reference lists plus the tolerant-reader principle
  • Migration checklist — eight ordered steps for shipping a version bump

Wiring

  • References the api.versioning section of .claude/pipeline.config.json (and links it)
  • Linked from docs/api-development/README.md via a new API Versioning section

Notes

  • Docs-only; the affected CI job is the lychee link check. The RFC and Hono URLs were verified to return 200, all internal link targets exist, and inline-code backticks are balanced.
  • The minimal example apps mount routes at the root; the guide documents the intended /api/v1 default per the config and conventions without claiming those examples use it.

Closes #24

🤖 Generated with Claude Code

Add docs/api-development/api-versioning.md covering how to version a
Nerva/Hono API and evolve it without breaking consumers:

- Nerva's default (URL prefix /api/v1/) and the api.versioning block
  of pipeline.config.json that configures it
- API version (the contract) vs. release version (the build)
- all four strategies -- URL prefix, custom header, content
  negotiation, query parameter -- with trade-offs and a Hono
  implementation for each
- Deprecation (RFC 9745) and Sunset (RFC 8594) headers, gated by
  deprecationHeaderEnabled, with a Hono middleware
- a breaking vs. non-breaking change reference
- a migration checklist for version bumps

Linked from docs/api-development/README.md via a new API Versioning
section.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@PAMulligan PAMulligan linked an issue Jun 13, 2026 that may be closed by this pull request
9 tasks
@PAMulligan PAMulligan self-assigned this Jun 13, 2026
@github-actions github-actions Bot added the area: docs Documentation label Jun 13, 2026
@PAMulligan PAMulligan added documentation Improvements or additions to documentation area: devex Developer experience area: deployment Deployment targets labels Jun 13, 2026
@PAMulligan PAMulligan moved this from Todo to In Progress in PMDS Open Source Roadmap Jun 13, 2026
@PAMulligan PAMulligan merged commit 412d79e into main Jun 13, 2026
13 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in PMDS Open Source Roadmap Jun 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: deployment Deployment targets area: devex Developer experience area: docs Documentation documentation Improvements or additions to documentation

Projects

Development

Successfully merging this pull request may close these issues.

Add API versioning strategy guide

1 participant