-
Notifications
You must be signed in to change notification settings - Fork 14.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ScheduleInterval schema in OpenAPI specs should have "nullable: true" otherwise generated OpenAPI client will throw an error in case of nullable "schedule_interval" #22358
Comments
Thanks for opening your first issue here! Be sure to follow the issue template! |
Good catch. Pull request would be very welcomed! |
Does adding |
I think it doesn't really help, the issue will be on the generated client side. |
Currently when I hit the below API I get the response:
How does setting the |
From what I understand, the problem is not in the API response, but the generated API clients. The response you have above is currently not consumable by an API client. Adding |
Apache Airflow version
2.2.4 (latest released)
What happened
Currently we have this schema definition in the OpenAPI specs:
The issue with above is, when using an OpenAPI generator for Java for example (I think is same for other languages as well), it will treat
ScheduleInterval
as non-nullable property, although what is returned under/dags/{dag_id}
or/dags/{dag_id}/details
in case of aNone
schedule_interval
isnull
forschedule_interval
.What you think should happen instead
We should have
nullable: true
inScheduleInterval
schema which will allowschedule_interval
to be parsed asnull
.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 the maintainers think is a valid bug, I will be more than happy to submit a PR :)
Are you willing to submit PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: