You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/03/18 15:11:23 UTC
[GitHub] [airflow] omarsmak opened a new issue #22365: '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
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] potiuk commented on issue #22365: '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
Posted by GitBox <gi...@apache.org>.
potiuk commented on issue #22365:
URL: https://github.com/apache/airflow/issues/22365#issuecomment-1074181155
Feel free to fix it.
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org