This is an automated email from the ASF dual-hosted git repository.

jscheffl pushed a commit to branch v3-1-test
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/v3-1-test by this push:
     new 4d3bd06ca11 [v3-1-test] Respect enable_swagger_ui config in API server 
(#64376) (#64398)
4d3bd06ca11 is described below

commit 4d3bd06ca11e48d1ad0c2de0341632cf02bc4d40
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Sun Mar 29 11:24:06 2026 +0200

    [v3-1-test] Respect enable_swagger_ui config in API server (#64376) (#64398)
    
    (cherry picked from commit 01fa0ea24b8cb9a1e8c0b2f3013518f6407ca5a7)
    
    Co-authored-by: Jens Scheffler <[email protected]>
---
 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 c13ea9ed675..527748bd613 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()

Reply via email to