from fastapi import FastAPI from fastapi.openapi.docs import get_redoc_html, get_swagger_ui_html app = FastAPI(title="GarbageReminder API", docs_url=None, redoc_url=None, version="0.1") @app.get("/docs", include_in_schema=False) async def custom_swagger_ui_html(): return get_swagger_ui_html( openapi_url=app.openapi_url, title=f"{app.title} - Documentation", swagger_favicon_url="/favicon.ico", ) @app.get("/redoc", include_in_schema=False) async def custom_redoc_html(): return get_redoc_html( openapi_url=app.openapi_url, title=f"{app.title} - Documentation", redoc_favicon_url="/favicon.ico", )