Use favicon
This commit is contained in:
parent
378047e622
commit
bf7982c56b
4 changed files with 20 additions and 8 deletions
|
|
@ -7,7 +7,11 @@ from starlette.responses import HTMLResponse
|
|||
def bootstrap_docs_endpoints(app: FastAPI) -> None:
|
||||
@app.get("/docs", include_in_schema=False)
|
||||
def custom_swagger_ui_html() -> HTMLResponse:
|
||||
return get_swagger_ui_html(openapi_url="openapi.json", title=app.title)
|
||||
return get_swagger_ui_html(
|
||||
openapi_url="openapi.json",
|
||||
title=app.title,
|
||||
swagger_favicon_url="/favicon.ico",
|
||||
)
|
||||
|
||||
@app.get("/docs/index.html", include_in_schema=False)
|
||||
def redirect_to_docs() -> RedirectResponse:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue