api-versioning-strategy
Installation
SKILL.md
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)
const v1Router = require('./routes/v1');
const v2Router = require('./routes/v2');