FM-007 Data Contracts and Schema Validation

API Versioning and Compatibility Failures

Provider and consumer disagree on which version is active, or a provider introduces changes without correctly separating versions.

Failure explanation

The provider and consumer disagree about the API version or the behavior associated with it. Version selection may be ambiguous across URL paths, headers, media types, or gateway routing. A deployment can accidentally route a versioned request to the wrong implementation, silently change a default version, or preserve the URL while changing semantics.

Example

A client calls /v1/orders, but a gateway rewrite sends it to the v2 backend. The v2 backend interprets a missing shippingMode differently, so existing orders are created with an unintended default.

How to test

  • Test supported, unsupported, missing, and malformed version selectors.
  • Verify routing to the intended implementation.
  • Compare behavior and schemas across versions.
  • Test deprecation and sunset transitions, including default-version changes.

Expected behavior

Version selection is deterministic and documented. Each supported version preserves its promised contract, and unsupported versions produce a clear documented response rather than silently falling back.

Runnable examples

Each example includes a broken server, a fixed server, an OpenAPI spec, and a clrsig scenario that detects the failure.

Learn how to find and fix it