Skip to content

Commit e4b1976

Browse files
committed
Change v1 to v2 in generated OpenAPI schema files (#50705)
(cherry picked from commit baf5fae)
1 parent 8d38768 commit e4b1976

16 files changed

Lines changed: 15 additions & 15 deletions

File tree

airflow-core/docs/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -349,8 +349,8 @@ def add_airflow_core_exclude_patterns_to_sphinx(exclude_patterns: list[str]):
349349

350350
graphviz_output_format = "svg"
351351

352-
main_openapi_path = Path(main_openapi_file).parent.joinpath("v1-rest-api-generated.yaml")
353-
sam_openapi_path = Path(sam_openapi_file).parent.joinpath("v1-simple-auth-manager-generated.yaml")
352+
main_openapi_path = Path(main_openapi_file).parent.joinpath("v2-rest-api-generated.yaml")
353+
sam_openapi_path = Path(sam_openapi_file).parent.joinpath("v2-simple-auth-manager-generated.yaml")
354354
redoc = [
355355
{
356356
"name": "Simple auth manager token API",

airflow-core/src/airflow/api_fastapi/auth/managers/simple/openapi/v1-simple-auth-manager-generated.yaml renamed to airflow-core/src/airflow/api_fastapi/auth/managers/simple/openapi/v2-simple-auth-manager-generated.yaml

File renamed without changes.

airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"lint:fix": "eslint --fix && tsc --p tsconfig.app.json",
1111
"format": "pnpm prettier --write .",
1212
"preview": "vite preview",
13-
"codegen": "openapi-rq -i \"../openapi/v1-simple-auth-manager-generated.yaml\" -c axios --format prettier -o openapi-gen --operationId",
13+
"codegen": "openapi-rq -i \"../openapi/v2-simple-auth-manager-generated.yaml\" -c axios --format prettier -o openapi-gen --operationId",
1414
"test": "vitest run",
1515
"coverage": "vitest run --coverage"
1616
},

airflow-core/src/airflow/api_fastapi/core_api/openapi/v1-rest-api-generated.yaml renamed to airflow-core/src/airflow/api_fastapi/core_api/openapi/v2-rest-api-generated.yaml

File renamed without changes.

airflow-core/src/airflow/ui/openapi-merge.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"inputs": [
33
{
4-
"inputFile": "../api_fastapi/core_api/openapi/v1-rest-api-generated.yaml"
4+
"inputFile": "../api_fastapi/core_api/openapi/v2-rest-api-generated.yaml"
55
},
66
{
77
"inputFile": "../api_fastapi/core_api/openapi/_private_ui.yaml"

airflow-ctl/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ use-standard-collections=true # list[] not List[]
127127
use-subclass-enum=true # enum, not union of Literals
128128
use-union-operator=true # 3.9+annotations, not `Union[]`
129129

130-
url = "http://0.0.0.0:28080/openapi.json"
130+
input = "../airflow-core/src/airflow/api_fastapi/core_api/openapi/v2-rest-api-generated.yaml"
131131
output = "src/airflowctl/api/datamodels/generated.py"
132132

133133
## pytest settings ##

airflow-ctl/src/airflowctl/api/datamodels/auth_generated.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# under the License.
1717

1818
# generated by datamodel-codegen:
19-
# filename: http://0.0.0.0:8080/auth/openapi.json
19+
# filename: v2-simple-auth-manager-generated.yaml
2020
# version: 0.28.2
2121
# mypy: disable-error-code="assignment"
2222

airflow-ctl/src/airflowctl/api/datamodels/generated.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# under the License.
1717

1818
# generated by datamodel-codegen:
19-
# filename: http://0.0.0.0:28080/openapi.json
19+
# filename: v2-rest-api-generated.yaml
2020
# version: 0.28.2
2121

2222
from __future__ import annotations

contributing-docs/16_adding_api_endpoints.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ Step 4: Run Pre-commit Hooks
7474
-----------------------------
7575
1. Ensure all code meets the project's quality standards by running pre-commit hooks.
7676
2. Pre-commit hooks include static code checks, formatting, and other validations.
77-
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.
77+
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.
7878
4. Run the following command to execute all pre-commit hooks:
7979
8080
.. code-block:: bash

dev/README_RELEASE_PYTHON_CLIENT.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ echo "${VERSION}" > clients/python/version.txt
9191

9292
```shell script
9393
cd ${AIRFLOW_REPO_ROOT}
94-
git log 2.8.0..HEAD --pretty=oneline -- airflow-core/src/airflow/api_fastapi/core_api/openapi/v1-rest-api-generated.yaml
94+
git log 2.8.0..HEAD --pretty=oneline -- airflow-core/src/airflow/api_fastapi/core_api/openapi/v2-rest-api-generated.yaml
9595
```
9696

9797
- Update CHANGELOG.md with the details.

0 commit comments

Comments
 (0)