How would you approach REST resource contracts with backward-compatible clients?
Answer
Start by mapping the request, state changes, dependencies and trust boundaries end to end. Focus on REST resource contracts with backward-compatible clients. Use protocol semantics, the published contract and authoritative persisted state as the oracle. Cover status codes, schemas, idempotency, concurrency, authorization and failure recovery. Keep data and dependencies controlled enough to reproduce failures. Release only when client-visible behavior and stored data remain consistent across retries and partial failures.
Strong answer includes
- explicit risk and test oracle for REST resource contracts
- checks both contract and side effects
- includes concurrency and authorization
- measurable evidence and residual-risk statement
Practical example
A /orders/{id} PATCH endpoint was documented in OpenAPI to return 200 with the full resource, but one client library was silently accepting a 204 with no body. Older mobile clients still in the field expected the previous response shape, so the contract test had to run against both the old and new schema. Walking through it this way turned a vague complaint into a short, reproducible write-up someone else could act on without extra back-and-forth.