hussein-awala commented on code in PR #37866:
URL: https://github.com/apache/airflow/pull/37866#discussion_r1510331779


##########
airflow/api_connexion/schemas/dag_schema.py:
##########
@@ -149,6 +149,16 @@ def get_params(obj: DAG):
         return {k: v.dump() for k, v in params.items()}
 
 
+class DAGDetailSchemaWithTasksInfo(DAGDetailSchema):
+    """DAG with task ids details."""
+
+    tasks = fields.Method("get_tasks", dump_only=True)
+    @staticmethod
+    def get_tasks(obj: DAG) -> list[str]:
+        """Get DAG task ids."""
+        return list(obj.task_dict.keys())

Review Comment:
   I wonder if it is possible/useful to add more details to the tasks (upstream 
list, downstream list, is setup? is teardown? ...)
   I have no strong opinion on this, let's wait for other reviews before 
changing it



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