spectree
spectree copied to clipboard
feat: Disable publishing of /apidoc route
Describe the feature
Add a boolean argument to the Spectree constructor that defines whether the /apidoc routes will be created or not. Maybe even being able to select whether to create the route /apidoc/openapi.json but not the /apidoc/swagger one.
Additional context
I use this a lot in development but when launching to production I'd like to be able to disable the /apidoc route but keep the validation.
The context of creating only the /apidoc/openapi.json is not something I particularly need but might be interesting to have for someone else.
I think that might be useful, feel free to open PR.