This is an automated email from the ASF dual-hosted git repository.
jscheffl pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 01fa0ea24b8 Respect enable_swagger_ui config in API server (#64376)
01fa0ea24b8 is described below
commit 01fa0ea24b8cb9a1e8c0b2f3013518f6407ca5a7
Author: Jens Scheffler <[email protected]>
AuthorDate: Sun Mar 29 11:19:19 2026 +0200
Respect enable_swagger_ui config in API server (#64376)
---
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 9b7dd0a9acc..86ba79f7a06 100644
--- a/airflow-core/src/airflow/api_fastapi/app.py
+++ b/airflow-core/src/airflow/api_fastapi/app.py
@@ -95,6 +95,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()