Skip to content

Commit 2ed58f4

Browse files
committed
fix swagger url
1 parent 69bde83 commit 2ed58f4

File tree

1 file changed

+2
-15
lines changed

1 file changed

+2
-15
lines changed

main.py

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@
3333
root_path="" if PROXY_PATH is None else f"/{PROXY_PATH}",
3434
title="IHR API",
3535
description=description,
36-
version="v1.11",
37-
docs_url=None,
36+
version="v1.12",
3837
redoc_url=None,
38+
swagger_ui_parameters={ "defaultModelsExpandDepth": -1 }
3939
)
4040

4141
# Automatically import and register all routers inside "controllers"
@@ -44,19 +44,6 @@
4444
if hasattr(module, "router"):
4545
app.include_router(module.router)
4646

47-
@app.get("/docs", include_in_schema=False)
48-
@app.get("/docs/", include_in_schema=False)
49-
def swagger_ui_html():
50-
return get_swagger_ui_html(
51-
openapi_url=app.openapi_url,
52-
title=app.title,
53-
swagger_js_url="https://unpkg.com/swagger-ui-dist@5/swagger-ui-bundle.js",
54-
swagger_css_url="https://unpkg.com/swagger-ui-dist@5/swagger-ui.css",
55-
swagger_ui_parameters={
56-
"defaultModelsExpandDepth": -1
57-
}
58-
)
59-
6047
origins = [
6148
"http://localhost:5173",
6249
"http://www.ihr.live",

0 commit comments

Comments
 (0)