omarsmak opened a new issue #22365:
URL: https://github.com/apache/airflow/issues/22365
### Apache Airflow version
2.2.4 (latest released)
### What happened
We have this in the `DAGRun` model:
```
external_trigger:
type: boolean
default: true
readOnly: true
```
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 only `external_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?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]