spectree icon indicating copy to clipboard operation
spectree copied to clipboard

feat: Disable publishing of /apidoc route

Open AndreasBBS opened this issue 1 year ago • 1 comments

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.

AndreasBBS avatar May 12 '23 17:05 AndreasBBS

I think that might be useful, feel free to open PR.

yedpodtrzitko avatar May 14 '23 10:05 yedpodtrzitko