From 22a336b51a6cdb77b16444d4a83e80e36ba001b1 Mon Sep 17 00:00:00 2001 From: Pierre Millot Date: Sat, 11 Jan 2025 13:58:00 +0100 Subject: [PATCH 1/2] fix(specs): deprecate task v1 --- specs/ingestion/paths/tasks/v1/enableTask.yml | 1 + specs/ingestion/paths/tasks/v1/runTask.yml | 1 + specs/ingestion/paths/tasks/v1/searchTasks.yml | 1 + specs/ingestion/paths/tasks/v1/taskID.yml | 3 +++ specs/ingestion/paths/tasks/v1/tasks.yml | 2 ++ 5 files changed, 8 insertions(+) diff --git a/specs/ingestion/paths/tasks/v1/enableTask.yml b/specs/ingestion/paths/tasks/v1/enableTask.yml index 691d371e0f..4505b58ea8 100644 --- a/specs/ingestion/paths/tasks/v1/enableTask.yml +++ b/specs/ingestion/paths/tasks/v1/enableTask.yml @@ -4,6 +4,7 @@ put: summary: Enable a task description: Enables a task using the v1 endpoint, please use `enableTask` instead. operationId: enableTaskV1 + deprecated: true x-acl: - addObject - deleteIndex diff --git a/specs/ingestion/paths/tasks/v1/runTask.yml b/specs/ingestion/paths/tasks/v1/runTask.yml index 2aab117d61..bbddee7229 100644 --- a/specs/ingestion/paths/tasks/v1/runTask.yml +++ b/specs/ingestion/paths/tasks/v1/runTask.yml @@ -4,6 +4,7 @@ post: summary: Run a task description: Runs a task using the v1 endpoint, please use `runTask` instead. You can check the status of task runs with the observability endpoints. operationId: runTaskV1 + deprecated: true x-acl: - addObject - deleteIndex diff --git a/specs/ingestion/paths/tasks/v1/searchTasks.yml b/specs/ingestion/paths/tasks/v1/searchTasks.yml index 3198c01167..b0d12c2fde 100644 --- a/specs/ingestion/paths/tasks/v1/searchTasks.yml +++ b/specs/ingestion/paths/tasks/v1/searchTasks.yml @@ -4,6 +4,7 @@ post: summary: Search for tasks description: Searches for tasks using the v1 endpoint, please use `searchTasks` instead. operationId: searchTasksV1 + deprecated: true x-acl: - addObject - deleteIndex diff --git a/specs/ingestion/paths/tasks/v1/taskID.yml b/specs/ingestion/paths/tasks/v1/taskID.yml index 2aa389834d..59ab575f19 100644 --- a/specs/ingestion/paths/tasks/v1/taskID.yml +++ b/specs/ingestion/paths/tasks/v1/taskID.yml @@ -4,6 +4,7 @@ get: summary: Retrieve a task description: Retrieves a task by its ID using the v1 endpoint, please use `getTask` instead. operationId: getTaskV1 + deprecated: true x-acl: - addObject - deleteIndex @@ -26,6 +27,7 @@ patch: summary: Update a task description: Updates a task by its ID using the v1 endpoint, please use `updateTask` instead. operationId: updateTaskV1 + deprecated: true parameters: - $ref: '../../../common/parameters.yml#/pathTaskID' x-codegen-request-body-name: taskUpdate @@ -51,6 +53,7 @@ delete: summary: Delete a task description: Deletes a task by its ID using the v1 endpoint, please use `deleteTask` instead. operationId: deleteTaskV1 + deprecated: true parameters: - $ref: '../../../common/parameters.yml#/pathTaskID' responses: diff --git a/specs/ingestion/paths/tasks/v1/tasks.yml b/specs/ingestion/paths/tasks/v1/tasks.yml index f380a243d7..20243cf98b 100644 --- a/specs/ingestion/paths/tasks/v1/tasks.yml +++ b/specs/ingestion/paths/tasks/v1/tasks.yml @@ -4,6 +4,7 @@ get: summary: List tasks description: Retrieves a list of tasks using the v1 endpoint, please use `getTasks` instead. operationId: listTasksV1 + deprecated: true x-acl: - addObject - deleteIndex @@ -47,6 +48,7 @@ post: summary: Create a task description: Creates a new task using the v1 endpoint, please use `createTask` instead. operationId: createTaskV1 + deprecated: true x-codegen-request-body-name: taskCreate requestBody: description: Request body for creating a task. From 6590314aaa57d6ae709dfd701633ff89f34ce5fc Mon Sep 17 00:00:00 2001 From: Pierre Millot Date: Mon, 13 Jan 2025 12:04:23 +0100 Subject: [PATCH 2/2] rename summary --- .../ingestion/paths/tasks/v1/disableTask.yml | 2 +- specs/ingestion/paths/tasks/v1/enableTask.yml | 2 +- specs/ingestion/paths/tasks/v1/runTask.yml | 2 +- .../ingestion/paths/tasks/v1/searchTasks.yml | 2 +- specs/ingestion/paths/tasks/v1/taskID.yml | 4 ++-- specs/ingestion/paths/tasks/v1/tasks.yml | 4 ++-- specs/ingestion/spec.yml | 24 +++++++++---------- 7 files changed, 20 insertions(+), 20 deletions(-) diff --git a/specs/ingestion/paths/tasks/v1/disableTask.yml b/specs/ingestion/paths/tasks/v1/disableTask.yml index 5e845d3c62..f7cf1e63d2 100644 --- a/specs/ingestion/paths/tasks/v1/disableTask.yml +++ b/specs/ingestion/paths/tasks/v1/disableTask.yml @@ -1,7 +1,7 @@ put: tags: - tasks - summary: Disable a task + summary: Disable a task V1 description: Disables a task using the v1 endpoint, please use `disableTask` instead. operationId: disableTaskV1 deprecated: true diff --git a/specs/ingestion/paths/tasks/v1/enableTask.yml b/specs/ingestion/paths/tasks/v1/enableTask.yml index 4505b58ea8..3030e0f628 100644 --- a/specs/ingestion/paths/tasks/v1/enableTask.yml +++ b/specs/ingestion/paths/tasks/v1/enableTask.yml @@ -1,7 +1,7 @@ put: tags: - tasks - summary: Enable a task + summary: Enable a task V1 description: Enables a task using the v1 endpoint, please use `enableTask` instead. operationId: enableTaskV1 deprecated: true diff --git a/specs/ingestion/paths/tasks/v1/runTask.yml b/specs/ingestion/paths/tasks/v1/runTask.yml index bbddee7229..6f6fbc267b 100644 --- a/specs/ingestion/paths/tasks/v1/runTask.yml +++ b/specs/ingestion/paths/tasks/v1/runTask.yml @@ -1,7 +1,7 @@ post: tags: - tasks - summary: Run a task + summary: Run a task V1 description: Runs a task using the v1 endpoint, please use `runTask` instead. You can check the status of task runs with the observability endpoints. operationId: runTaskV1 deprecated: true diff --git a/specs/ingestion/paths/tasks/v1/searchTasks.yml b/specs/ingestion/paths/tasks/v1/searchTasks.yml index b0d12c2fde..537ffa7035 100644 --- a/specs/ingestion/paths/tasks/v1/searchTasks.yml +++ b/specs/ingestion/paths/tasks/v1/searchTasks.yml @@ -1,7 +1,7 @@ post: tags: - tasks - summary: Search for tasks + summary: Search for tasks V1 description: Searches for tasks using the v1 endpoint, please use `searchTasks` instead. operationId: searchTasksV1 deprecated: true diff --git a/specs/ingestion/paths/tasks/v1/taskID.yml b/specs/ingestion/paths/tasks/v1/taskID.yml index 59ab575f19..b8adb0cc0d 100644 --- a/specs/ingestion/paths/tasks/v1/taskID.yml +++ b/specs/ingestion/paths/tasks/v1/taskID.yml @@ -1,7 +1,7 @@ get: tags: - tasks - summary: Retrieve a task + summary: Retrieve a task V1 description: Retrieves a task by its ID using the v1 endpoint, please use `getTask` instead. operationId: getTaskV1 deprecated: true @@ -24,7 +24,7 @@ get: patch: tags: - tasks - summary: Update a task + summary: Update a task V1 description: Updates a task by its ID using the v1 endpoint, please use `updateTask` instead. operationId: updateTaskV1 deprecated: true diff --git a/specs/ingestion/paths/tasks/v1/tasks.yml b/specs/ingestion/paths/tasks/v1/tasks.yml index 20243cf98b..15eb55429c 100644 --- a/specs/ingestion/paths/tasks/v1/tasks.yml +++ b/specs/ingestion/paths/tasks/v1/tasks.yml @@ -1,7 +1,7 @@ get: tags: - tasks - summary: List tasks + summary: List tasks V1 description: Retrieves a list of tasks using the v1 endpoint, please use `getTasks` instead. operationId: listTasksV1 deprecated: true @@ -45,7 +45,7 @@ get: post: tags: - tasks - summary: Create a task + summary: Create a task V1 description: Creates a new task using the v1 endpoint, please use `createTask` instead. operationId: createTaskV1 deprecated: true diff --git a/specs/ingestion/spec.yml b/specs/ingestion/spec.yml index 5cfaf24e5a..74bc7de149 100644 --- a/specs/ingestion/spec.yml +++ b/specs/ingestion/spec.yml @@ -144,18 +144,6 @@ paths: $ref: 'paths/sources/runSource.yml' # tasks API. - /1/tasks: - $ref: 'paths/tasks/v1/tasks.yml' - /1/tasks/search: - $ref: 'paths/tasks/v1/searchTasks.yml' - /1/tasks/{taskID}: - $ref: 'paths/tasks/v1/taskID.yml' - /1/tasks/{taskID}/run: - $ref: 'paths/tasks/v1/runTask.yml' - /1/tasks/{taskID}/enable: - $ref: 'paths/tasks/v1/enableTask.yml' - /1/tasks/{taskID}/disable: - $ref: 'paths/tasks/v1/disableTask.yml' /2/tasks: $ref: 'paths/tasks/v2/tasks.yml' /2/tasks/search: @@ -170,6 +158,18 @@ paths: $ref: 'paths/tasks/v2/enableTask.yml' /2/tasks/{taskID}/disable: $ref: 'paths/tasks/v2/disableTask.yml' + /1/tasks: + $ref: 'paths/tasks/v1/tasks.yml' + /1/tasks/search: + $ref: 'paths/tasks/v1/searchTasks.yml' + /1/tasks/{taskID}: + $ref: 'paths/tasks/v1/taskID.yml' + /1/tasks/{taskID}/run: + $ref: 'paths/tasks/v1/runTask.yml' + /1/tasks/{taskID}/enable: + $ref: 'paths/tasks/v1/enableTask.yml' + /1/tasks/{taskID}/disable: + $ref: 'paths/tasks/v1/disableTask.yml' # transformations API. /1/transformations: