Versioning strategies, backward compatibility, and contract testing
How to evolve APIs without breaking existing clients.
GET /api/v1/users GET /api/v2/users
URI versioning, header versioning, content negotiation.
| Strategy | Pros | Cons |
|---|---|---|
| URL | Clear, simple | Multiple endpoints |
| Header | Clean URLs | Less visible |
Ensure API compatibility with consumer-driven contracts.
pact.given("user exists").upon_receiving("GET request").will_respond_with(200)