Skip to content

Conversation

@ashb
Copy link
Member

@ashb ashb commented Apr 24, 2025

This change improves the generated code using the OpenAPI schema:

  • anyOf to oneOf so that generated clients don't try all schemas, but
    stop after the first
  • Fix the header pattern to make it valid against the spec
  • Use the function name as the default operation ID in the spec.

On this last part, this is a different implementation (but same effect) to how
we do operation name in the Core API. I will change CoreAPI to use this same
method in a separate PR, but I didn't want to touch both APIs in this PR for
clarity of git history


^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in airflow-core/newsfragments.

@ashb ashb requested review from amoghrajesh and kaxil as code owners April 24, 2025 10:08
@boring-cyborg boring-cyborg bot added area:API Airflow's REST/HTTP API area:task-sdk labels Apr 24, 2025
This change improves the generated code using the OpenAPI schema:

- `anyOf` to `oneOf` so that generated clients don't try _all_ schemas, but
  stop after the first
- Fix the header pattern to make it valid against the spec
- Use the function name as the default operation ID in the spec.

On this last part, this is a different implementation (but same effect) to how
we do operation name in the Core API. I will change CoreAPI to use this same
method in a separate PR, but I didn't want to touch both APIs in this PR for
clarity of git history
@ashb ashb force-pushed the anyof-to-oneof-exec-api-schema branch from b4e6eb1 to 1d467f7 Compare April 24, 2025 10:40
@ashb ashb merged commit 1df5b41 into apache:main Apr 24, 2025
91 of 92 checks passed
@ashb ashb deleted the anyof-to-oneof-exec-api-schema branch April 24, 2025 11:12
kaxil pushed a commit that referenced this pull request Apr 24, 2025
This change improves the generated code using the OpenAPI schema:

- `anyOf` to `oneOf` so that generated clients don't try _all_ schemas, but
  stop after the first
- Fix the header pattern to make it valid against the spec
- Use the function name as the default operation ID in the spec.

On this last part, this is a different implementation (but same effect) to how
we do operation name in the Core API. I will change CoreAPI to use this same
method in a separate PR, but I didn't want to touch both APIs in this PR for
clarity of git history

(cherry picked from commit 1df5b41)
prabhusneha pushed a commit to astronomer/airflow that referenced this pull request Apr 25, 2025
…9700)

This change improves the generated code using the OpenAPI schema:

- `anyOf` to `oneOf` so that generated clients don't try _all_ schemas, but
  stop after the first
- Fix the header pattern to make it valid against the spec
- Use the function name as the default operation ID in the spec.

On this last part, this is a different implementation (but same effect) to how
we do operation name in the Core API. I will change CoreAPI to use this same
method in a separate PR, but I didn't want to touch both APIs in this PR for
clarity of git history
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:API Airflow's REST/HTTP API area:task-sdk

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants