← Back to context

Comment by __MatrixMan__

8 hours ago

I like to generate clients with type hints based on an openapi spec so that if the spec changes, the clients get regenerated, and then the type checker squawks if any code is impacted by the spec change.

There are also openapi spec validators to catch spec problems up front.

And you can use contract testing (e.g. https://docs.pact.io/) to replay your client tests (with a mocked server) against the server (with mocked clients)--never having to actually spin up both a the same time.

Together this creates a pretty widespread set of correctness checks that generate feedback at multiple points.

It's maybe overkill for the project I'm using it on, but as a set of AI handcuffs I like it quite a bit.