api-versioning
API versioning strategies for ASP.NET Core. Covers Asp.Versioning library, URL segment, header, and query string strategies, version deprecation, and OpenAPI integration. Load this skill when adding versioning to an API, evolving an API with breaking changes, or when the user mentions "API version",
By codewithmukesh · 1,182 installs
npx skills add codewithmukesh/dotnet-claude-kit --skill api-versioning
Source repository · Upstream listing
API Versioning
Core Principles
1. Version from day one — Adding versioning later is painful. Start with a version in the URL even if you only have v1.
2. URL segment versioning is the default — /api/v1/orders is the most discoverable and cache friendly strategy.
3. Never break existing versions — Add a new version for breaking changes. Deprecate the old version with a timeline.
4. Version the API, not individual endpoints — All endpoints in a version group share the same version number.
Patterns
Setup with Asp.Versioning
URL Segment Versioning (Recommended)
Header Versioning (Alternative)
Deprecating a Version
Version Specific Endpoint Groups
Anti patterns
Don't Version Individual Endpoints
Don't Use Query String Versioning as Default
Decision Guide
Scenario Recommendation
New public API URL segment versioning from day one
Internal API between services Header versioning (cleaner URLs)
Breaking response shape change New version
Adding new optional fields Same version (backwards compatible)
Deprecating a version Mark deprecated, set sunset date, document migration path