From c46e541d3ff654f0d63825674d345e27d5532eba Mon Sep 17 00:00:00 2001 From: Jens Scheffler <95105677+jscheffl@users.noreply.github.com> Date: Sun, 29 Mar 2026 11:19:19 +0200 Subject: [PATCH] [v3-1-test] Respect enable_swagger_ui config in API server (#64376) (cherry picked from commit 01fa0ea24b8cb9a1e8c0b2f3013518f6407ca5a7) Co-authored-by: Jens Scheffler <95105677+jscheffl@users.noreply.github.com> --- airflow-core/src/airflow/api_fastapi/app.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/airflow-core/src/airflow/api_fastapi/app.py b/airflow-core/src/airflow/api_fastapi/app.py index c13ea9ed675a3..527748bd613a8 100644 --- a/airflow-core/src/airflow/api_fastapi/app.py +++ b/airflow-core/src/airflow/api_fastapi/app.py @@ -96,6 +96,8 @@ def create_app(apps: str = "all") -> FastAPI: lifespan=lifespan, root_path=API_ROOT_PATH.removesuffix("/"), version="2", + docs_url="/docs" if conf.getboolean("api", "enable_swagger_ui") else None, + redoc_url="/redoc" if conf.getboolean("api", "enable_swagger_ui") else None, ) dag_bag = create_dag_bag()