By default FastAPI uses CDN for swagger ui assets, with this repository you can use it offline. - fastapi-offline-swagger-ui/setup.py at main · ahmetoner/fastapi-offline-swagger-ui
By default FastAPI uses CDN for swagger ui assets, with this repository you can use it offline. - ahmetoner/fastapi-offline-swagger-ui
()''' This following code block necessary to switch offline cdn files via fastapi_offline_swagger_ui module'''assets_path=fastapi_offline_swagger_ui.__path__[0]ifpath.exists(assets_path+"/swagger-ui.css")andpath.exists(assets_path+"/swagger-ui-bundle.js"):app.mount("/assets",...
pip3 install git+https://github.com/ahmetoner/fastapi-offline-swagger-ui or pyproject.toml [tool.poetry.dependencies] ... fastapi-offline-swagger-ui = {git ="https://github.com/ahmetoner/fastapi-offline-swagger-ui"} Usage Examples After installing the module, create a python file. Copy and...