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/01/25 02:51:46 UTC

[GitHub] [airflow-client-python] 11010cy commented on issue #40: [openapi] wrong use of $ref and nullable

11010cy commented on issue #40:
URL: https://github.com/apache/airflow-client-python/issues/40#issuecomment-1020757386


   [Suggest a fix]
   As referenced in https://github.com/OpenAPITools/openapi-generator/issues/11352, there's bug in inline composed schemas.
   
   So the right schema could be:
   
   ```
   ...
   dag_run_timeout:
                 $ref: '#/components/schemas/NullableTimeDelta'
   ...
   
   ...
       TimeDelta:
         description: Time delta
         type: object
         required:
           - __type
           - days
           - seconds
           - microseconds
         properties:
           __type: {type: string}
           days: {type: integer}
           seconds: {type: integer}
           microseconds: {type: integer}
   
       NullableTimeDelta:
         description: |
           nullable timeDelta. marks a timeDelta object to be nullable.
         oneOf:
           - type: null
           - $ref: '#/components/schemas/TimeDelta'
   ...
   ```
   
   It works fine for me.
   


-- 
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