3 ms·
> To me it should be written, then consumed by the back-end service. This is an option, but I find that it works better to have OAS documents generated from wh
by eropple 7y ago
> To me it should be written, then consumed by the back-end service.
This is an option, but I find that it works better to have OAS documents generated from what the server is actually doing. Specifying routes based on what the server actually does is, IMO, a more rigorous way to create an OAS spec than to hand-write the spec and then generate a server from it.
I've written a couple of libraries that do exactly this:
https://github.com/eropple/nestjs-openapi3 https://github.com/eropple/nestjs-openapi3 - OpenAPI3 library for NestJS that standardizes input validation
https://github.com/modern-project/modern-ruby https://github.com/modern-project/modern-ruby - a Ruby web framework built around OAS3 concepts + rigorous validation