scotty
scotty copied to clipboard
[RFC] OpenAPI interop
How would interop with OpenAPI look like?
e.g.
- generate server stubs out of API specs? like what
openapi-codegendoes : https://openapi-generator.tech/docs/usage - ~~generate an API spec from scotty server code?~~ would require ActionT to be completely rewritten
A very lightweight approach:
- Gather routes into a datastructure at construction time, reusing machinery developed for #266
- Provide an openapi endpoint that returns static assets for swagger-ui (https://swagger.io/docs/open-source-tools/swagger-ui/usage/installation/#unpkg ) using the pre-generated endpoint doc