Aller au contenu
#0704
Exec

The docs sit in the request path

Your API's request and response schemas already generate its OpenAPI spec: hoody-exec derives the document from the scripts themselves, so the docs can't lag the code.

In staging, you close the loop from the other side: a hook validates every live response against that spec. A field that changed type, an enum that grew, a null that shouldn't be there: each mismatch gets logged with the path and the offending payload before it reaches a client.

Contract testing usually lives in CI, exercising the requests someone thought to write. This runs against every request staging actually receives, judged by a spec nobody had to hand-maintain.

The API can't drift from its docs; the docs are in the request path.