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

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


The following commit(s) were added to refs/heads/v3-0-test by this push:
     new e4b19768eec Change v1 to v2 in generated OpenAPI schema files (#50705)
e4b19768eec is described below

commit e4b19768eec6890c0c7215793ea6e574c9d76e02
Author: Kaxil Naik <[email protected]>
AuthorDate: Sat May 17 13:35:20 2025 +0530

    Change v1 to v2 in generated OpenAPI schema files (#50705)
    
    (cherry picked from commit baf5faec690b09703c38e5b05b459058c2914a83)
---
 airflow-core/docs/conf.py                                             | 4 ++--
 ...h-manager-generated.yaml => v2-simple-auth-manager-generated.yaml} | 0
 .../src/airflow/api_fastapi/auth/managers/simple/ui/package.json      | 2 +-
 .../{v1-rest-api-generated.yaml => v2-rest-api-generated.yaml}        | 0
 airflow-core/src/airflow/ui/openapi-merge.json                        | 2 +-
 airflow-ctl/pyproject.toml                                            | 2 +-
 airflow-ctl/src/airflowctl/api/datamodels/auth_generated.py           | 2 +-
 airflow-ctl/src/airflowctl/api/datamodels/generated.py                | 2 +-
 contributing-docs/16_adding_api_endpoints.rst                         | 2 +-
 dev/README_RELEASE_PYTHON_CLIENT.md                                   | 2 +-
 dev/airflow-github                                                    | 2 +-
 dev/breeze/src/airflow_breeze/commands/release_management_commands.py | 2 +-
 dev/breeze/tests/test_selective_checks.py                             | 2 +-
 devel-common/src/docs/provider_conf.py                                | 2 +-
 ...auth-manager-generated.yaml => v2-fab-auth-manager-generated.yaml} | 0
 scripts/in_container/run_generate_openapi_spec.py                     | 4 ++--
 16 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/airflow-core/docs/conf.py b/airflow-core/docs/conf.py
index dfcafe1ed99..6ee9437509c 100644
--- a/airflow-core/docs/conf.py
+++ b/airflow-core/docs/conf.py
@@ -349,8 +349,8 @@ spelling_ignore_importable_modules = True
 
 graphviz_output_format = "svg"
 
-main_openapi_path = 
Path(main_openapi_file).parent.joinpath("v1-rest-api-generated.yaml")
-sam_openapi_path = 
Path(sam_openapi_file).parent.joinpath("v1-simple-auth-manager-generated.yaml")
+main_openapi_path = 
Path(main_openapi_file).parent.joinpath("v2-rest-api-generated.yaml")
+sam_openapi_path = 
Path(sam_openapi_file).parent.joinpath("v2-simple-auth-manager-generated.yaml")
 redoc = [
     {
         "name": "Simple auth manager token API",
diff --git 
a/airflow-core/src/airflow/api_fastapi/auth/managers/simple/openapi/v1-simple-auth-manager-generated.yaml
 
b/airflow-core/src/airflow/api_fastapi/auth/managers/simple/openapi/v2-simple-auth-manager-generated.yaml
similarity index 100%
rename from 
airflow-core/src/airflow/api_fastapi/auth/managers/simple/openapi/v1-simple-auth-manager-generated.yaml
rename to 
airflow-core/src/airflow/api_fastapi/auth/managers/simple/openapi/v2-simple-auth-manager-generated.yaml
diff --git 
a/airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/package.json 
b/airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/package.json
index 61e99e77731..451b1939ffc 100644
--- a/airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/package.json
+++ b/airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/package.json
@@ -10,7 +10,7 @@
     "lint:fix": "eslint --fix && tsc --p tsconfig.app.json",
     "format": "pnpm prettier --write .",
     "preview": "vite preview",
-    "codegen": "openapi-rq -i 
\"../openapi/v1-simple-auth-manager-generated.yaml\" -c axios --format prettier 
-o openapi-gen --operationId",
+    "codegen": "openapi-rq -i 
\"../openapi/v2-simple-auth-manager-generated.yaml\" -c axios --format prettier 
-o openapi-gen --operationId",
     "test": "vitest run",
     "coverage": "vitest run --coverage"
   },
diff --git 
a/airflow-core/src/airflow/api_fastapi/core_api/openapi/v1-rest-api-generated.yaml
 
b/airflow-core/src/airflow/api_fastapi/core_api/openapi/v2-rest-api-generated.yaml
similarity index 100%
rename from 
airflow-core/src/airflow/api_fastapi/core_api/openapi/v1-rest-api-generated.yaml
rename to 
airflow-core/src/airflow/api_fastapi/core_api/openapi/v2-rest-api-generated.yaml
diff --git a/airflow-core/src/airflow/ui/openapi-merge.json 
b/airflow-core/src/airflow/ui/openapi-merge.json
index 7b4bcb75ca1..059cadf6fd5 100644
--- a/airflow-core/src/airflow/ui/openapi-merge.json
+++ b/airflow-core/src/airflow/ui/openapi-merge.json
@@ -1,7 +1,7 @@
 {
   "inputs": [
     {
-      "inputFile": "../api_fastapi/core_api/openapi/v1-rest-api-generated.yaml"
+      "inputFile": "../api_fastapi/core_api/openapi/v2-rest-api-generated.yaml"
     },
     {
       "inputFile": "../api_fastapi/core_api/openapi/_private_ui.yaml"
diff --git a/airflow-ctl/pyproject.toml b/airflow-ctl/pyproject.toml
index e9bbc394453..02f6919aee2 100644
--- a/airflow-ctl/pyproject.toml
+++ b/airflow-ctl/pyproject.toml
@@ -127,7 +127,7 @@ use-standard-collections=true # list[] not List[]
 use-subclass-enum=true # enum, not union of Literals
 use-union-operator=true # 3.9+annotations, not `Union[]`
 
-url = "http://0.0.0.0:28080/openapi.json";
+input = 
"../airflow-core/src/airflow/api_fastapi/core_api/openapi/v2-rest-api-generated.yaml"
 output = "src/airflowctl/api/datamodels/generated.py"
 
 ## pytest settings ##
diff --git a/airflow-ctl/src/airflowctl/api/datamodels/auth_generated.py 
b/airflow-ctl/src/airflowctl/api/datamodels/auth_generated.py
index 4f2bc0a9b0e..5898f1928ea 100644
--- a/airflow-ctl/src/airflowctl/api/datamodels/auth_generated.py
+++ b/airflow-ctl/src/airflowctl/api/datamodels/auth_generated.py
@@ -16,7 +16,7 @@
 # under the License.
 
 # generated by datamodel-codegen:
-#   filename:  http://0.0.0.0:8080/auth/openapi.json
+#   filename:  v2-simple-auth-manager-generated.yaml
 #   version:   0.28.2
 # mypy: disable-error-code="assignment"
 
diff --git a/airflow-ctl/src/airflowctl/api/datamodels/generated.py 
b/airflow-ctl/src/airflowctl/api/datamodels/generated.py
index 74fdedbc628..dbfaef6f398 100644
--- a/airflow-ctl/src/airflowctl/api/datamodels/generated.py
+++ b/airflow-ctl/src/airflowctl/api/datamodels/generated.py
@@ -16,7 +16,7 @@
 # under the License.
 
 # generated by datamodel-codegen:
-#   filename:  http://0.0.0.0:28080/openapi.json
+#   filename:  v2-rest-api-generated.yaml
 #   version:   0.28.2
 
 from __future__ import annotations
diff --git a/contributing-docs/16_adding_api_endpoints.rst 
b/contributing-docs/16_adding_api_endpoints.rst
index 02d2940b418..1881e7a2ba8 100644
--- a/contributing-docs/16_adding_api_endpoints.rst
+++ b/contributing-docs/16_adding_api_endpoints.rst
@@ -74,7 +74,7 @@ Step 4: Run Pre-commit Hooks
 -----------------------------
 1. Ensure all code meets the project's quality standards by running pre-commit 
hooks.
 2. Pre-commit hooks include static code checks, formatting, and other 
validations.
-3. Persisted openapi spec is located in ``v1-rest-api-generated.yaml` and a 
hook will take care of updating it based on your new endpoint, you just need to 
add and commit the change.
+3. Persisted openapi spec is located in ``v2-rest-api-generated.yaml` and a 
hook will take care of updating it based on your new endpoint, you just need to 
add and commit the change.
 4. Run the following command to execute all pre-commit hooks:
 
 .. code-block:: bash
diff --git a/dev/README_RELEASE_PYTHON_CLIENT.md 
b/dev/README_RELEASE_PYTHON_CLIENT.md
index 126f9ebe9d2..8fe8909e054 100644
--- a/dev/README_RELEASE_PYTHON_CLIENT.md
+++ b/dev/README_RELEASE_PYTHON_CLIENT.md
@@ -91,7 +91,7 @@ echo "${VERSION}" > clients/python/version.txt
 
 ```shell script
 cd ${AIRFLOW_REPO_ROOT}
-git log 2.8.0..HEAD --pretty=oneline -- 
airflow-core/src/airflow/api_fastapi/core_api/openapi/v1-rest-api-generated.yaml
+git log 2.8.0..HEAD --pretty=oneline -- 
airflow-core/src/airflow/api_fastapi/core_api/openapi/v2-rest-api-generated.yaml
 ```
 
 - Update CHANGELOG.md with the details.
diff --git a/dev/airflow-github b/dev/airflow-github
index 562c28c3fc2..5866f13f4ff 100755
--- a/dev/airflow-github
+++ b/dev/airflow-github
@@ -408,7 +408,7 @@ def api_clients_policy(previous_version, target_version):
         repo,
         previous_version,
         target_version,
-        
files=[f"{repo.working_dir}/airflow-core/src/airflow/api_fastapi/core_api/openapi/v1-rest-api-generated.yaml"],
+        
files=[f"{repo.working_dir}/airflow-core/src/airflow/api_fastapi/core_api/openapi/v2-rest-api-generated.yaml"],
     )
 
     clients_need_release = False
diff --git 
a/dev/breeze/src/airflow_breeze/commands/release_management_commands.py 
b/dev/breeze/src/airflow_breeze/commands/release_management_commands.py
index c2fa9b0807c..c54d76467ac 100644
--- a/dev/breeze/src/airflow_breeze/commands/release_management_commands.py
+++ b/dev/breeze/src/airflow_breeze/commands/release_management_commands.py
@@ -3067,7 +3067,7 @@ REPRODUCIBLE_BUILD_YAML = AIRFLOW_ROOT_PATH / 
"reproducible_build.yaml"
 
 VERSION_FILE = PYTHON_CLIENT_DIR_PATH / "version.txt"
 SOURCE_API_YAML_PATH = (
-    AIRFLOW_ROOT_PATH / 
"airflow-core/src/airflow/api_fastapi/core_api/openapi/v1-rest-api-generated.yaml"
+    AIRFLOW_ROOT_PATH / 
"airflow-core/src/airflow/api_fastapi/core_api/openapi/v2-rest-api-generated.yaml"
 )
 TARGET_API_YAML_PATH = PYTHON_CLIENT_DIR_PATH / "v2.yaml"
 OPENAPI_GENERATOR_CLI_VER = "7.13.0"
diff --git a/dev/breeze/tests/test_selective_checks.py 
b/dev/breeze/tests/test_selective_checks.py
index 4b4ecdf0bb3..956b151261e 100644
--- a/dev/breeze/tests/test_selective_checks.py
+++ b/dev/breeze/tests/test_selective_checks.py
@@ -2009,7 +2009,7 @@ def test_expected_output_push(
             id="Tests for all airflow core types except providers should run 
if model file changed",
         ),
         pytest.param(
-            
("airflow-core/src/airflow/api_fastapi/core_api/openapi/v1-rest-api-generated.yaml",),
+            
("airflow-core/src/airflow/api_fastapi/core_api/openapi/v2-rest-api-generated.yaml",),
             {
                 "selected-providers-list-as-string": "",
                 "all-python-versions": 
f"['{DEFAULT_PYTHON_MAJOR_MINOR_VERSION}']",
diff --git a/devel-common/src/docs/provider_conf.py 
b/devel-common/src/docs/provider_conf.py
index ce5f09188d3..7e19a79b2d7 100644
--- a/devel-common/src/docs/provider_conf.py
+++ b/devel-common/src/docs/provider_conf.py
@@ -360,7 +360,7 @@ if PACKAGE_NAME in PROVIDER_PACKAGES_WITH_REDOC:
         "v1-flask-api.yaml"
     )
     fab_auth_manager_fastapi_api_path = 
Path(fab_auth_manager_fastapi_api_file).parent.joinpath(
-        "v1-fab-auth-manager-generated.yaml"
+        "v2-fab-auth-manager-generated.yaml"
     )
     redoc = [
         {
diff --git 
a/providers/fab/src/airflow/providers/fab/auth_manager/api_fastapi/openapi/v1-fab-auth-manager-generated.yaml
 
b/providers/fab/src/airflow/providers/fab/auth_manager/api_fastapi/openapi/v2-fab-auth-manager-generated.yaml
similarity index 100%
rename from 
providers/fab/src/airflow/providers/fab/auth_manager/api_fastapi/openapi/v1-fab-auth-manager-generated.yaml
rename to 
providers/fab/src/airflow/providers/fab/auth_manager/api_fastapi/openapi/v2-fab-auth-manager-generated.yaml
diff --git a/scripts/in_container/run_generate_openapi_spec.py 
b/scripts/in_container/run_generate_openapi_spec.py
index 1caea62e67d..cd8c0d5d4f4 100755
--- a/scripts/in_container/run_generate_openapi_spec.py
+++ b/scripts/in_container/run_generate_openapi_spec.py
@@ -29,12 +29,12 @@ from airflow.api_fastapi.core_api import __file__ as 
CORE_API_PATH
 sys.path.insert(0, str(Path(__file__).parent.resolve()))
 from in_container_utils import console, generate_openapi_file, 
validate_openapi_file
 
-OPENAPI_SPEC_FILE = Path(CORE_API_PATH).parent / "openapi" / 
"v1-rest-api-generated.yaml"
+OPENAPI_SPEC_FILE = Path(CORE_API_PATH).parent / "openapi" / 
"v2-rest-api-generated.yaml"
 # We need a "combined" spec file to generate the UI code with, but we don't 
want to include this in the repo
 # nor in the rendered docs, so we make this a separate file which is gitignored
 OPENAPI_UI_SPEC_FILE = Path(CORE_API_PATH).parent / "openapi" / 
"_private_ui.yaml"
 SIMPLE_AUTH_MANAGER_OPENAPI_SPEC_FILE = (
-    Path(SIMPLE_AUTH_MANAGER_PATH).parent / "openapi" / 
"v1-simple-auth-manager-generated.yaml"
+    Path(SIMPLE_AUTH_MANAGER_PATH).parent / "openapi" / 
"v2-simple-auth-manager-generated.yaml"
 )
 
 # Generate main application openapi spec

Reply via email to