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 2021/12/06 21:22:31 UTC

[GitHub] [airflow] ephraimbuddy commented on a change in pull request #19758: Api add support bulk pause resume

ephraimbuddy commented on a change in pull request #19758:
URL: https://github.com/apache/airflow/pull/19758#discussion_r763406321



##########
File path: airflow/api_connexion/openapi/v1.yaml
##########
@@ -445,27 +428,22 @@ paths:
       summary: Update DAGs
       x-openapi-router-controller: airflow.api_connexion.endpoints.dag_endpoint
       operationId: patch_dags
-      tags: [DAG]
       parameters:
         - $ref: '#/components/parameters/PageLimit'
         - $ref: '#/components/parameters/PageOffset'
         - $ref: '#/components/parameters/FilterTags'
         - $ref: '#/components/parameters/UpdateMask'
-        - name: only_active
-          in: query
-          schema:
-            type: boolean
-            default: true
-          required: false
-          description: |
-            Only update active DAGs.
-        - name: dag_id_pattern
-          in: query
-          schema:
-            type: string
-          required: false
-          description: |
-            If set, only update DAGs with dag_ids matching this pattern.
+        - $ref: '#/components/parameters/OnlyActive'
+        - $ref: '#/components/parameters/DagIdPattern'
+      tags: [DAG]
+      requestBody:
+        required: true
+        content:
+          application/json:
+            schema:
+              $ref: '#/components/schemas/DAGCollection'

Review comment:
       Only `is_paused` is allowed to be updated but because of how clients work, we have to give the DAG object so that we generate a correct request body in clients. For example, we don't want to just have `is_paused` object, when `is_paused` is part of DAG and we already have a DAG object. The API doc knows to generate it in documentation correctly by filtering out readonly fields.




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