Open WilliamStam opened 1 year ago
I think I like this idea, not sure of the heft it would add (which may be none if we move this type of stuff out into a plugin)
If I understand this correctly, this would be addressed by #2541 ?
It would be in scope of that change, although not the original intent I think
Summary
Right now the
OpenAPIController
limits the docs to redoc and swagger. it might be a nice idea to allow a normal "route" to serve the main html doc file. allow a controller function in the APIController to render whichever docs template that is required similar to how templating etc work instead of "hard coding" it in.Im really enjoying https://rapidocweb.com/ at the moment.
seems the only way is to keep the
OpenAPIController
path to/schema
for/schema/openapi.json
and then add another route to render a template that loads the spec file from/schema/openapi.json
. making it openapi front end independent could be a good idea.Basic Example
Drawbacks and Impact
adding in more "generic" code and potentially bloating the OpenAPIController. in future even the redocs / swagger can be migrated as "plugin" docs which would actualy make the code base easier to maintain and cleaner
Unresolved questions
No response
Funding