Re:Four kinds of documentation
by eropple on Friday October 18, 2019 @11:29AM
(#21292187)
> 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:
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 - OpenAPI3 library for NestJS that standardizes input validation
https://github.com/modern-project/modern-ruby - a Ruby web framework built around OAS3 concepts + rigorous validation