mik-laj commented on a change in pull request #19105:
URL: https://github.com/apache/airflow/pull/19105#discussion_r744343850
##########
File path: airflow/api_connexion/schemas/task_instance_schema.py
##########
@@ -27,28 +28,34 @@
from airflow.utils.state import State
-class TaskInstanceSchema(Schema):
+class TaskInstanceSchema(SQLAlchemySchema):
"""Task instance schema"""
- task_id = fields.Str()
- dag_id = fields.Str()
- execution_date = fields.DateTime(validate=validate_istimezone)
- start_date = fields.DateTime(validate=validate_istimezone)
- end_date = fields.DateTime(validate=validate_istimezone)
- duration = fields.Float()
- state = TaskInstanceStateField()
Review comment:
Here you deleted the validations of allowed states. This field should
only allow values allowed by the OpenAPI specification.
https://github.com/apache/airflow/blob/26ad55beb00f5a0915ba4bec541e3d67044834e9/airflow/api_connexion/openapi/v1.yaml#L3406-L3419
--
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]