api-versioning-strategy

Solid

Implements API versioning using URL paths, headers, or query parameters with backward compatibility and deprecation strategies. Use when managing multiple API versions, planning breaking changes, or designing migration paths.

API & Backend 162 stars 25 forks Updated 2 weeks ago MIT

Install

View on GitHub

Quality Score: 86/100

Stars 20%
74
Recency 20%
90
Frontmatter 20%
70
Documentation 15%
91
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# API Versioning Strategy Choose and implement API versioning approaches with proper deprecation timelines. ## Versioning Methods | Method | Example | Pros | Cons | |--------|---------|------|------| | URL Path | `/api/v1/users` | Clear, cache-friendly | URL clutter | | Header | `API-Version: 1` | Clean URLs | Hidden, harder to test | | Query | `?version=1` | Easy to use | Not RESTful | ## URL Path Versioning (Recommended) ```javascript const v1Router = require('./routes/v1'); const v2Router = require('./routes/v2'); app.use('/api/v1', v1Router); app.use('/api/v2', v2Router); ``` ## Version Adapter Pattern ```javascript // Transform between versions const v1ToV2 = (v1Response) => ({ data: { type: 'user', id: v1Response.user_id, attributes: { name: v1Response.user_name, email: v1Response.email } } }); ``` ## Deprecation Headers ```javascript app.use('/api/v1', (req, res, next) => { res.setHeader('Deprecation', 'true'); res.setHeader('Sunset', 'Sat, 01 Jun 2025 00:00:00 GMT'); res.setHeader('Link', '</api/v2>; rel="successor-version"'); next(); }); ``` ## Safe vs Breaking Changes **Safe Changes** (no version bump): - Adding optional fields - Adding new endpoints - Adding optional parameters **Breaking Changes** (requires new version): - Removing fields - Changing field types - Restructuring responses - Removing endpoints ## Deprecation Timeline | Phase | Duration | Actions | |-------|----------|---------| | Deprecated | 3 m...

Details

Author
secondsky
Repository
secondsky/claude-skills
Created
6 months ago
Last Updated
2 weeks ago
Language
TypeScript
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Featured

versioning-apis

Implement API versioning with backward compatibility, deprecation notices, and migration paths. Use when managing API versions and backward compatibility. Trigger with phrases like "version the API", "manage API versions", or "handle API versioning".

2,274 Updated today
jeremylongshore
API & Backend Solid

api-versioning-strategy

Write an API versioning strategy document for a service or API platform. Use when asked to define versioning policy, plan API deprecation, classify breaking changes, or document version lifecycle. Produces a complete versioning strategy with breaking-change classification table, deprecation timeline, migration guide template, and client communication template.

918 Updated 4 days ago
mohitagw15856
API & Backend Solid

api-changelog-versioning

Creates comprehensive API changelogs documenting breaking changes, deprecations, and migration strategies for API consumers. Use when managing API versions, communicating breaking changes, or creating upgrade guides.

162 Updated 2 weeks ago
secondsky
API & Backend Listed

typescript-api-design

REST API design patterns. Use when designing endpoints, error responses, pagination, versioning, or API structure. Framework-agnostic principles for building consistent, maintainable APIs.

28 Updated 1 weeks ago
martinffx
AI & Automation Featured

migrating-apis

Implement API migrations between versions, platforms, or frameworks with minimal downtime. Use when upgrading APIs between versions. Trigger with phrases like "migrate the API", "upgrade API version", or "migrate to new API".

2,274 Updated today
jeremylongshore