10 ms·
I use it extensively in prod. Well the superset that is OpenApi. It enables contract first development where any change to the api is done in the schema fist, a
by seer 4y ago
I use it extensively in prod. Well the superset that is OpenApi. It enables contract first development where any change to the api is done in the schema fist, and then implemented by the clients/server.
Since we have tooling[0] that validates requests and responses at runtime, the clients can be absolutely sure of what they receive (we through 500 if the server attempts to respond with an undocumented respond) And the server is also sure about the shape of the requests. This allows us to validate everything at compile time too, generating typescript types for both client and server.
And since we have similar tooling regarding our data stores (typescript types for sql queries) most of the time if there is a bug, the code would simply not compile - pretty nifty!
[0] - https://github.com/ovotech/laminar https://github.com/ovotech/laminar
- mderazon 4y agoHow do you keep the openapi spec file updated over time ? Our problem is usually making sure changes to the api get reflected and updated in the open api spec file.