uranusjr commented on a change in pull request #17839:
URL: https://github.com/apache/airflow/pull/17839#discussion_r697918061



##########
File path: airflow/api_connexion/schemas/dag_run_schema.py
##########
@@ -104,6 +104,14 @@ def autofill(self, data, **kwargs):
         return data
 
 
+class SetDagRunStateFormSchema(Schema):
+    """Schema for handling the request of setting state of DAG run"""
+
+    run_id = auto_field(data_key='dag_run_id')
+    dag_id = auto_field(dump_only=True)
+    state = DagStateField(dump_only=True)

Review comment:
       ```suggestion
   class SetDagRunStateFormSchema(Schema):
       """Schema for handling the request of setting state of DAG run"""
   
       state = DagStateField()
   ```
   
   We don’t have these fields in the schema now. Also `dump_only` means this 
field cannot be include in a POST form, which is opposite to what you want. 
Technically you can add `load_only=True`, but since this entire schema is only 
used to load data anyway, the flag would not practically change anything.




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