From 700441942e347a1f64dc804c44bf0a0cbca885bc Mon Sep 17 00:00:00 2001 From: Pierre Millot Date: Mon, 13 Jan 2025 13:59:14 +0100 Subject: [PATCH] fix(specs): deprecate task v1 [skip-bc] (#4327) --- .../ingestion/paths/tasks/v1/disableTask.yml | 2 +- specs/ingestion/paths/tasks/v1/enableTask.yml | 3 ++- specs/ingestion/paths/tasks/v1/runTask.yml | 3 ++- .../ingestion/paths/tasks/v1/searchTasks.yml | 3 ++- specs/ingestion/paths/tasks/v1/taskID.yml | 7 ++++-- specs/ingestion/paths/tasks/v1/tasks.yml | 6 +++-- specs/ingestion/spec.yml | 24 +++++++++---------- 7 files changed, 28 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 691d371e0f..3030e0f628 100644 --- a/specs/ingestion/paths/tasks/v1/enableTask.yml +++ b/specs/ingestion/paths/tasks/v1/enableTask.yml @@ -1,9 +1,10 @@ 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 x-acl: - addObject - deleteIndex diff --git a/specs/ingestion/paths/tasks/v1/runTask.yml b/specs/ingestion/paths/tasks/v1/runTask.yml index 2aab117d61..6f6fbc267b 100644 --- a/specs/ingestion/paths/tasks/v1/runTask.yml +++ b/specs/ingestion/paths/tasks/v1/runTask.yml @@ -1,9 +1,10 @@ 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 x-acl: - addObject - deleteIndex diff --git a/specs/ingestion/paths/tasks/v1/searchTasks.yml b/specs/ingestion/paths/tasks/v1/searchTasks.yml index 3198c01167..537ffa7035 100644 --- a/specs/ingestion/paths/tasks/v1/searchTasks.yml +++ b/specs/ingestion/paths/tasks/v1/searchTasks.yml @@ -1,9 +1,10 @@ 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 x-acl: - addObject - deleteIndex diff --git a/specs/ingestion/paths/tasks/v1/taskID.yml b/specs/ingestion/paths/tasks/v1/taskID.yml index 2aa389834d..b8adb0cc0d 100644 --- a/specs/ingestion/paths/tasks/v1/taskID.yml +++ b/specs/ingestion/paths/tasks/v1/taskID.yml @@ -1,9 +1,10 @@ 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 x-acl: - addObject - deleteIndex @@ -23,9 +24,10 @@ 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 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..15eb55429c 100644 --- a/specs/ingestion/paths/tasks/v1/tasks.yml +++ b/specs/ingestion/paths/tasks/v1/tasks.yml @@ -1,9 +1,10 @@ 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 x-acl: - addObject - deleteIndex @@ -44,9 +45,10 @@ 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 x-codegen-request-body-name: taskCreate requestBody: description: Request body for creating a task. 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: