api-versioning-patterns
SolidAPI versioning strategies, breaking change detection, deprecation lifecycle, and migration guides
AI & Automation 534 stars
44 forks Updated 1 months ago MIT
Install
Quality Score: 86/100
Stars 20%
Recency 20%
Frontmatter 20%
Documentation 15%
Issue Health 10%
License 10%
Description 5%
Skill Content
# API Versioning Patterns
## Versioning Strategies
| Strateji | Örnek | Pros | Cons |
|----------|-------|------|------|
| URL Path | `/v1/users` | Açık, cache-friendly | URL kirliliği |
| Header | `Accept: application/vnd.api+json;v=2` | Clean URL | Debug zor |
| Query Param | `/users?version=2` | Basit | Cache sorunlu |
| Content Negotiation | `Accept: application/vnd.company.v2+json` | RESTful | Karmaşık |
**Öneri:** URL Path (`/v1/`) — en yaygın, en anlaşılır.
## Breaking Change Detection
```typescript
// Breaking changes
const breakingChanges = [
'Required field ekleme',
'Field silme veya rename',
'Type değiştirme (string → number)',
'Enum value silme',
'Response structure değiştirme',
'Error code değiştirme',
'Auth requirement ekleme'
]
// Non-breaking changes
const nonBreaking = [
'Optional field ekleme',
'Yeni endpoint ekleme',
'Enum value ekleme',
'Response'a optional field ekleme',
'Performance improvement'
]
```
## Deprecation Lifecycle
```
Phase 1: ANNOUNCE (3 ay önce)
→ Deprecation header: Sunset: Sat, 01 Jan 2027 00:00:00 GMT
→ API docs'ta uyarı
→ Consumer'lara email
Phase 2: WARN (2 ay önce)
→ Response header: Deprecation: true
→ Log: deprecated endpoint kullanımı
→ Dashboard: kullanım metrikleri
Phase 3: THROTTLE (1 ay önce)
→ Rate limit düşür
→ Warning response body'ye ekle
Phase 4: SUNSET
→ 410 Gone döndür
→ Migration guide link'i ile
```
## Migration Guide Template
```markdown
# Migration: v1 → v2
##...
Details
- Author
- vibeeval
- Repository
- vibeeval/vibecosystem
- Created
- 6 months ago
- Last Updated
- 1 months ago
- Language
- C#
- License
- MIT
Integrates with
Similar Skills
Semantically similar based on skill content — not just same category
API & Backend Featured
api-versioning-strategy
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.
221 Updated today
secondsky AI & Automation Listed
api-versioning
Provides expert knowledge for designing, implementing, and managing REST API versioning strategies with deprecation workflows.
0 Updated today
lgzarturo API & Backend Featured
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.
221 Updated today
secondsky