Open jshields opened 2 years ago
That same bit of code seems to be the responsible for always making the documentation avaialable at /docs
even when provided a different url via the docs_url
parameter.
Should probably check the docs_url
of the FastAPI instance or take it from the kwargs of the VersionedFastAPI
I also have same problem - docs enabled, but:
app = FastAPI(docs_url=None, redoc_url=None, openapi_url=None)
Describe the bug Even with
docs_url
set toNone
, the docs are still served. Per the FastAPI documentation, the app should no longer serve docs with this option set.To Reproduce Set
docs_url=None
when instantiating the FastAPI app andVersionedFastAPI
but still see the docs served at/docs
.Expected behavior Expecting docs to no longer be served (for production use case).
Additional details Issue may be here: https://github.com/DeanWay/fastapi-versioning/blob/18d480f5bb067088f157f235a673cb4c65ec77d5/fastapi_versioning/versioning.py#L68-L73