potiuk commented on issue #85: URL: https://github.com/apache/airflow-client-python/issues/85#issuecomment-1597876425
OK. Found it. It looks like in the past it's been manually patched (maybe @ephraimbuddy remembers more): https://github.com/apache/airflow-client-python/commit/ddd6fc0545a8066f474c765e1644a5202eebd256 I do not know that much about OpenAPI specs, but I think it's not a bug in generatio, but the issue is that our OpenAPI specification is wrong: ``` execution_timeout: $ref: '#/components/schemas/TimeDelta' nullable: true retry_delay: $ref: '#/components/schemas/TimeDelta' nullable: true ``` Should be: ``` execution_timeout: anyOf: - type: 'null' # Note the quotes around 'null' - $ref: '#/components/schemas/TimeDelta' retry_delay: anyOf: - type: 'null' # Note the quotes around 'null' - $ref: '#/components/schemas/TimeDelta' ``` This generates this code in models/task.py ``` 'execution_timeout': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 'retry_delay': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 ``` Which seems pretty expected. We could again apply manual fix, but maybe more reasonable is to correct the specification. -- 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]
