scotty icon indicating copy to clipboard operation
scotty copied to clipboard

[RFC] OpenAPI interop

Open ocramz opened this issue 2 years ago • 1 comments

How would interop with OpenAPI look like?

e.g.

  • generate server stubs out of API specs? like what openapi-codegen does : https://openapi-generator.tech/docs/usage
  • ~~generate an API spec from scotty server code?~~ would require ActionT to be completely rewritten

ocramz avatar Nov 30 '23 17:11 ocramz

A very lightweight approach:

  1. Gather routes into a datastructure at construction time, reusing machinery developed for #266
  2. 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

ocramz avatar Feb 16 '25 18:02 ocramz