A hand-written specification that had been correct in March and described four endpoints that no longer existed. Generating from the router makes drift impossible in one direction —…
Generated types describe what the specification says, and the specification is a document rather than a runtime guarantee. res.json() returns any and assigning it to a generated type…
A test comparing the full response against a recorded fixture, breaking on an added field that no consumer reads. Additive changes are compatible and a test that fails…
Adding a field is safe by convention and unsafe in practice, because a client generated from a schema with additionalProperties: false rejects it. Stating what may change is…
Every API invents an error envelope and RFC 7807 is a perfectly good one that some client libraries already understand. type is the field a client branches on…
A test that validates a third party’s responses detects their change rather than yours, so failing a pull request on it blocks the wrong person. Notifying a channel…
RFC 8594 defines a header for announcing that a resource will stop being available, which puts the deprecation in the response rather than in somebody’s inbox. Almost no…
A mock is your belief about the provider, and a contract test compares that belief with their published schema. Running it on a schedule rather than on every…