enable swagger auth

This commit is contained in:
m.dabbagh 2026-01-28 10:46:37 +03:30
parent a1fbd12874
commit 2753b913fb

View File

@ -52,8 +52,8 @@ app = FastAPI(
title="Text Processor API", title="Text Processor API",
description="Text extraction and chunking system using Hexagonal Architecture", description="Text extraction and chunking system using Hexagonal Architecture",
version="1.0.0", version="1.0.0",
# docs_url=None, docs_url=None,
# redoc_url=None, redoc_url=None,
) )
router = APIRouter( router = APIRouter(
@ -364,20 +364,20 @@ async def health_check() -> HealthCheckResponse:
# Protected Documentation Routes # Protected Documentation Routes
# ============================================================================= # =============================================================================
# @app.get("/docs", include_in_schema=False) @app.get("/docs", include_in_schema=False)
# def api_docs(_: HTTPBasicCredentials = Depends(check_docs_credentials)): def api_docs(_: HTTPBasicCredentials = Depends(check_docs_credentials)):
# return get_swagger_ui_html( return get_swagger_ui_html(
# openapi_url="/openapi.json", openapi_url="/openapi.json",
# title="Protected Text-Processor API Docs" title="Protected Text-Processor API Docs"
# ) )
#
#
# @app.get("/redoc", include_in_schema=False) @app.get("/redoc", include_in_schema=False)
# def api_docs(_: HTTPBasicCredentials = Depends(check_docs_credentials)): def api_docs(_: HTTPBasicCredentials = Depends(check_docs_credentials)):
# return get_redoc_html( return get_redoc_html(
# openapi_url="/openapi.json", openapi_url="/openapi.json",
# title="Protected Text-Processor API Docs" title="Protected Text-Processor API Docs"
# ) )
# ============================================================================= # =============================================================================
# Application Setup # Application Setup