enable swagger auth
This commit is contained in:
parent
a1fbd12874
commit
2753b913fb
@ -52,8 +52,8 @@ app = FastAPI(
|
||||
title="Text Processor API",
|
||||
description="Text extraction and chunking system using Hexagonal Architecture",
|
||||
version="1.0.0",
|
||||
# docs_url=None,
|
||||
# redoc_url=None,
|
||||
docs_url=None,
|
||||
redoc_url=None,
|
||||
)
|
||||
|
||||
router = APIRouter(
|
||||
@ -364,20 +364,20 @@ async def health_check() -> HealthCheckResponse:
|
||||
# Protected Documentation Routes
|
||||
# =============================================================================
|
||||
|
||||
# @app.get("/docs", include_in_schema=False)
|
||||
# def api_docs(_: HTTPBasicCredentials = Depends(check_docs_credentials)):
|
||||
# return get_swagger_ui_html(
|
||||
# openapi_url="/openapi.json",
|
||||
# title="Protected Text-Processor API Docs"
|
||||
# )
|
||||
#
|
||||
#
|
||||
# @app.get("/redoc", include_in_schema=False)
|
||||
# def api_docs(_: HTTPBasicCredentials = Depends(check_docs_credentials)):
|
||||
# return get_redoc_html(
|
||||
# openapi_url="/openapi.json",
|
||||
# title="Protected Text-Processor API Docs"
|
||||
# )
|
||||
@app.get("/docs", include_in_schema=False)
|
||||
def api_docs(_: HTTPBasicCredentials = Depends(check_docs_credentials)):
|
||||
return get_swagger_ui_html(
|
||||
openapi_url="/openapi.json",
|
||||
title="Protected Text-Processor API Docs"
|
||||
)
|
||||
|
||||
|
||||
@app.get("/redoc", include_in_schema=False)
|
||||
def api_docs(_: HTTPBasicCredentials = Depends(check_docs_credentials)):
|
||||
return get_redoc_html(
|
||||
openapi_url="/openapi.json",
|
||||
title="Protected Text-Processor API Docs"
|
||||
)
|
||||
|
||||
# =============================================================================
|
||||
# Application Setup
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user