omarsmak opened a new issue #22358:
URL: https://github.com/apache/airflow/issues/22358


   ### Apache Airflow version
   
   2.2.4 (latest released)
   
   ### What happened
   
   Currently we have this schema definition in the OpenAPI specs:
   ```
       ScheduleInterval:
         description: |
           Schedule interval. Defines how often DAG runs, this object gets 
added to your latest task instance's
           execution_date to figure out the next schedule.
         readOnly: true
         oneOf:
           - $ref: '#/components/schemas/TimeDelta'
           - $ref: '#/components/schemas/RelativeDelta'
           - $ref: '#/components/schemas/CronExpression'
         discriminator:
           propertyName: __type
   ```
   
   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 a `None` 
`schedule_interval` is `null` for `schedule_interval`.
   
   ### What you think should happen instead
   
   We should have `nullable: true` in `ScheduleInterval` schema which will 
allow `schedule_interval` to be parsed as `null`.
   
   ### 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?
   
   - [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]


Reply via email to