'external_trigger' in OpenAPI specs has a default value which as a result, will be always included in the request body by the generated OpenAPI specs #22365
Labels
affected_version:2.2
Issues Reported for 2.2
area:API
Airflow's REST/HTTP API
area:core
good first issue
kind:bug
This is a clearly a bug
Stale Bug Report
Apache Airflow version
2.2.4 (latest released)
What happened
We have this in the
DAGRun
model:We use the same model for both getting the dagrun details and trigging dagrun. However, since we include a default value, the generated OpenAPI client will include the default value nevertheless during
POST /dags/{dag_id}/dagRuns
which as a result the request will be failed in the validation process on Airflow side since this is a read only property and was set nevertheless by the default value.For honesty, I am not sure if this shall be an Airflow bug or an OpenAPI generator bug (I think
readOnly
should be respected during and it should ignore the default value) but in the other hand, I don't really understand why has to be a default value for read onlyexternal_trigger
🤔 .Removing the default value shall fix this issue.
What you think should happen instead
No response
How to reproduce
No response
Operating System
Linux
Versions of Apache Airflow Providers
No response
Deployment
Official Apache Airflow Helm Chart
Deployment details
No response
Anything else
If you guys think this can be fixed on Airflow side, I will be happy to provide a PR .
Are you willing to submit PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: