fix openapi schema

Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
Vladimir Mandic
2026-07-01 11:23:07 +02:00
parent 743d585faa
commit f4dd9bd063
3 changed files with 5 additions and 4 deletions
+2
View File
@@ -58,6 +58,8 @@ And **SDNQ** improvements: now with *NPU* support and its own native *attention*
- log: strip ansi sequences from ring buffer and client side logging
- model metadata: handle invalid metadata and strip workflows
- ui debounce aspect-ratio linked width/height controls
- api: stricter api request and response schemas
- api: openapi schema exposure
## Update for 2026-06-16
+2 -2
View File
@@ -66,7 +66,7 @@ def create_docs(app: FastAPI):
"dom_id": "#swagger-ui",
}
@app.get("/docs", include_in_schema=True) # override for the default fastapi swagger route
@app.get("/docs", include_in_schema=False) # override for the default fastapi swagger route
async def custom_swagger_html():
res = get_swagger_ui_html(
title=f'{app.title}: Swagger UI',
@@ -79,7 +79,7 @@ def create_docs(app: FastAPI):
def create_redocs(app: FastAPI):
@app.get("/redocs", include_in_schema=True) # override for the default fastapi redocs route
@app.get("/redocs", include_in_schema=False) # override for the default fastapi redocs route
async def custom_redoc_html():
res = get_redoc_html(
title=f'{app.title}: ReDoc',
+1 -2
View File
@@ -67,8 +67,7 @@ fastapi_args = {
"description": "SD.Next",
"docs_url": None,
"redoc_url": None,
# "docs_url": "/docs" if cmd_opts.docs else None, # custom handler in api.py
# "redoc_url": "/redocs" if cmd_opts.docs else None,
"openapi_url": "/openapi.json" if shared.cmd_opts.docs else None, # only expose OpenAPI schema if docs are enabled
}