Skip to content

Commit

Permalink
Update main.py
Browse files Browse the repository at this point in the history
Revert deletions of comments in `overridden_swagger` and `overridden_redoc`
  • Loading branch information
KhushiRajurkar committed Feb 18, 2025
1 parent 4cc91c5 commit 77ab587
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,9 @@ async def favicon():

@app.get("/docs", include_in_schema=False)
def overridden_swagger(request: Request):
"""
Overrides the Swagger UI HTML for the "/docs" endpoint.
"""
return get_swagger_ui_html(
openapi_url=f"{request.scope.get('root_path', '')}/openapi.json",
title="Neurobagel API",
Expand All @@ -156,6 +159,9 @@ def overridden_swagger(request: Request):

@app.get("/redoc", include_in_schema=False)
def overridden_redoc(request: Request):
"""
Overrides the Redoc HTML for the "/redoc" endpoint.
"""
return get_redoc_html(
openapi_url=f"{request.scope.get('root_path', '')}/openapi.json",
title="Neurobagel API",
Expand Down

0 comments on commit 77ab587

Please sign in to comment.