api-versioning
Installation
SKILL.md
API Versioning for Rails
Overview
Well-structured APIs need versioning for backwards compatibility and clear organization.
Versioning Strategies
| Strategy | URL Example | Header Example |
|---|---|---|
| URL Path | /api/v1/users |
- |
| Query Param | /api/users?version=1 |
- |
| Header | /api/users |
Accept: application/vnd.api+json; version=1 |
| Accept Header | /api/users |
Accept: application/vnd.myapp.v1+json |
Recommended: URL Path versioning (most common, easiest to understand)