api-versioning-strategy

Guides API versioning decisions using compatibility classification, expand-migrate-contract, and sunset patterns.

Updated Dec 29, 2025
One-click install
npx skills add https://github.com/snoodleboot-io/discrecontinual_equations --skill api-versioning-strategy-snoodleboot-io
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-versioning-strategy
Source: https://github.com/snoodleboot-io/discrecontinual_equations/tree/main/.claude/skills/api-versioning-strategy
Command: npx skills add https://github.com/snoodleboot-io/discrecontinual_equations --skill api-versioning-strategy-snoodleboot-io

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Changing a live API without breaking existing clients is hard: renames, new enum values, and tightened validation all silently crash integrations you do not control. This Skill provides a decision framework for classifying changes, choosing a versioning mechanism, and retiring old versions safely. ## Core Features & Use Cases - Breaking-change classification: A reference table that labels common changes (new fields, enum additions, validation tightening) as compatible or breaking before you ship them. - Expand-migrate-contract workflow: Step-by-step pattern with Python examples for renaming fields across separate deploys, including telemetry to measure legacy usage. - Deprecation and sunset mechanics: Concrete guidance on Deprecation/Sunset headers (RFC 8594), brownouts, per-client metrics, and versioning event schemas. - Use Case: You need to rename name to full_name in a public REST API. The Skill walks you through shipping both fields, instrumenting legacy reads, waiting for zero usage, and only then removing the old field. ## Quick Start Ask the AI to review a proposed API change and tell you whether it is breaking and how to roll it out safely.

Frequently Asked Questions about api-versioning-strategy

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I version a REST API without breaking existing clients?

Put an integer version in the URI path (e.g., /v2/orders), require it on every request, and never change existing fields in place. Ship changes as expand (add new field), migrate (move traffic with telemetry), then contract (remove old field) in separate deploys.

Is adding a new enum value to an API response a breaking change?

Yes, in practice. Clients with exhaustive switch statements and no default branch will crash on the unknown value. Either document from day one that enums are open and clients must tolerate unknowns, or introduce the new state in a new API version.

Should API versions go in the URI path or the Accept header?

URI path versioning is the recommended default. It is copy-pasteable into bug reports, greppable in access logs, trivially routable at gateways, and cached correctly without a Vary header. Header-based content negotiation is purist but painful in practice.

How long should a public API deprecation period last?

Plan roughly 12 months from announcement to sunset for public APIs, versus about 3 months for internal ones. Send Deprecation and Sunset headers on every response, run scheduled brownouts returning 410 Gone, and track per-client usage metrics before cutoff.

Why not rename an API field in a single deploy?

A rename has no rollback: the moment it ships, in-flight requests from old clients fail on the missing key, and rolling back does not undo client-side errors already surfaced. Expand-migrate-contract across separate releases is the safe alternative.