We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f3f9afa commit ef96644Copy full SHA for ef96644
1 file changed
app/main.py
@@ -12,6 +12,14 @@ def setup_static_files_and_docs(app: FastAPI):
12
"""Setup static files and custom documentation endpoints with favicon"""
13
app.mount("/static", StaticFiles(directory="static"), name="static")
14
15
+ @app.get("/", include_in_schema=False)
16
+ def root_docs():
17
+ return get_swagger_ui_html(
18
+ openapi_url=f"{app.root_path}/openapi.json",
19
+ title=settings.TITLE,
20
+ swagger_favicon_url=f"{app.root_path}/static/img/favicon-32x32.png",
21
+ )
22
+
23
@app.get("/docs", include_in_schema=False)
24
def overridden_swagger():
25
return get_swagger_ui_html(
0 commit comments