docs: add API versioning strategy guide#128
Merged
Merged
Conversation
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>
9 tasks
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.
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
api.versioningblock ofpipeline.config.json(strategy: "url-prefix",currentVersion: "v1",deprecationHeaderEnabled: true) and why URL-prefix is the defaultv1) vs. the deployed build (APP_VERSION)basePath, version-resolving middleware,Acceptmedia-type negotiation withVary)Deprecation(RFC 9745) andSunset(RFC 8594), gated bydeprecationHeaderEnabled, with a Hono middlewareWiring
api.versioningsection of.claude/pipeline.config.json(and links it)docs/api-development/README.mdvia a new API Versioning sectionNotes
200, all internal link targets exist, and inline-code backticks are balanced./api/v1default per the config and conventions without claiming those examples use it.Closes #24
🤖 Generated with Claude Code