We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
You can continue the conversation there. Go to discussion →
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I want to self-host all resource but I can't find any document change logo swagger I only see https://fastapi.tiangolo.com/advanced/extending-openapi/ to host js and css
I want to change <link rel="shortcut icon" href="https://fastapi.tiangolo.com/img/favicon.png"> store in my host
<link rel="shortcut icon" href="https://fastapi.tiangolo.com/img/favicon.png">
Moreover, does anyone help me link to custom template,... swagger and redoc? Thanks
http://localhost:8000/docs
The text was updated successfully, but these errors were encountered:
You can override the default redoc_url and docs_url, then you can create your own endpoint. Which you can customize however if you want.
redoc_url
docs_url
from fastapi import FastAPI from fastapi.openapi.docs import get_swagger_ui_html, get_redoc_html app = FastAPI(docs_url=None, redoc_url=None) @app.get("/docs", include_in_schema=False) def overridden_swagger(): return get_swagger_ui_html(openapi_url="/openapi.json", title="FastAPI", swagger_favicon_url="https://placekitten.com/200/300") @app.get("/redoc", include_in_schema=False) def overridden_redoc(): return get_redoc_html(openapi_url="/openapi.json", title="FastAPI", redoc_favicon_url="https://placekitten.com/200/300")
Sorry, something went wrong.
Thank you a lot I has been override but I didn't know "redoc_favicon_url" before. I will do it
Thanks for the help here @ycd ! 👏 🙇
Thanks for reporting back and closing the issue @letanloc1998 👍
Sorry for the long delay! 🙈 I wanted to personally address each issue/PR and they piled up through time, but now I'm checking each one in order.
No branches or pull requests
First check
Example
I want to self-host all resource but I can't find any document change logo swagger
I only see https://fastapi.tiangolo.com/advanced/extending-openapi/ to host js and css
I want to change
<link rel="shortcut icon" href="https://fastapi.tiangolo.com/img/favicon.png">store in my hostMoreover, does anyone help me link to custom template,... swagger and redoc? Thanks
Description
Environment
Additional context
http://localhost:8000/docs
The text was updated successfully, but these errors were encountered: