Skip to content

Commit

Permalink
Update default docs from Redoc to Swagger UI
Browse files Browse the repository at this point in the history
  • Loading branch information
jhj0517 committed Dec 7, 2024
1 parent eee8422 commit effa17f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions backend/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ async def lifespan(app: FastAPI):
app = FastAPI(
title="Whisper-WebUI-Backend",
description=f"""
REST API for Whisper-WebUI. Swagger UI is available via /docs, Redoc is available via /redoc or root URL with redirection.
REST API for Whisper-WebUI. Swagger UI is available via /docs or root URL with redirection. Redoc is available via /redoc.
""",
version="0.0.1",
lifespan=lifespan,
Expand Down Expand Up @@ -86,6 +86,7 @@ async def lifespan(app: FastAPI):
@app.get("/", response_class=RedirectResponse, include_in_schema=False)
async def index():
"""
Redirect to the documentation. Defaults to redoc : https://github.com/Redocly/redoc
Redirect to the documentation. Defaults to Swagger UI.
You can also check the /redoc with redoc style: https://github.com/Redocly/redoc
"""
return "/redoc"
return "/docs"

0 comments on commit effa17f

Please sign in to comment.