From d26946be097c8e62b26b570f0ca2279b56511c90 Mon Sep 17 00:00:00 2001 From: shortcuts Date: Thu, 25 Jul 2024 10:41:22 +0200 Subject: [PATCH 01/11] feat(specs): add v2 endpoints for ingestion --- specs/common/schemas/Batch.yml | 54 +++++++++++++++++++ specs/ingestion/paths/tasks/v1/pushTask.yml | 21 ++++++++ specs/ingestion/paths/tasks/v2/pushTask.yml | 21 ++++++++ specs/ingestion/spec.yml | 4 ++ specs/search/helpers/chunkedBatch.yml | 2 +- specs/search/paths/objects/batch.yml | 43 +-------------- specs/search/paths/objects/common/schemas.yml | 12 ----- specs/search/paths/objects/multipleBatch.yml | 2 +- tests/CTS/requests/ingestion/pushTask.json | 46 ++++++++++++++++ tests/CTS/requests/ingestion/pushTaskV1.json | 46 ++++++++++++++++ 10 files changed, 195 insertions(+), 56 deletions(-) create mode 100644 specs/common/schemas/Batch.yml create mode 100644 specs/ingestion/paths/tasks/v1/pushTask.yml create mode 100644 specs/ingestion/paths/tasks/v2/pushTask.yml create mode 100644 tests/CTS/requests/ingestion/pushTask.json create mode 100644 tests/CTS/requests/ingestion/pushTaskV1.json diff --git a/specs/common/schemas/Batch.yml b/specs/common/schemas/Batch.yml new file mode 100644 index 00000000000..2f04d63fb33 --- /dev/null +++ b/specs/common/schemas/Batch.yml @@ -0,0 +1,54 @@ +batchWriteParams: + title: batchWriteParams + description: Batch parameters. + type: object + additionalProperties: false + properties: + requests: + type: array + items: + title: batchRequest + type: object + additionalProperties: false + properties: + action: + $ref: '#/action' + body: + type: object + description: Operation arguments (varies with specified `action`). + example: + name: Betty Jane McCamey + company: Vita Foods Inc. + email: betty@mccamey.com + required: + - action + - body + required: + - requests + example: + batch: + summary: Batch indexing request + value: + requests: + - action: addObject + body: + name: Betty Jane McCamey + company: Vita Foods Inc. + email: betty@mccamey.com + - action: addObject + body: + name: Gayla geimer + company: Ortman McCain Co. + email: gayla@geimer.com + +action: + type: string + enum: + - addObject + - updateObject + - partialUpdateObject + - partialUpdateObjectNoCreate + - deleteObject + - delete + - clear + description: Type of indexing operation. diff --git a/specs/ingestion/paths/tasks/v1/pushTask.yml b/specs/ingestion/paths/tasks/v1/pushTask.yml new file mode 100644 index 00000000000..405f9cb1148 --- /dev/null +++ b/specs/ingestion/paths/tasks/v1/pushTask.yml @@ -0,0 +1,21 @@ +post: + tags: + - tasks + summary: Push a `batch` request payload through the Pipeline + description: Push a `batch` request payload through the Pipeline using the v1 endpoint, please use `pushTask` instead. You can check the status of task pushes with the observability endpoints. + operationId: pushTaskV1 + x-acl: + - addObject + - deleteIndex + - editSettings + parameters: + - $ref: '../../../common/parameters.yml#/pathTaskID' + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '../../../../common/schemas/Batch.yml#/batchWriteParams' + '400': + $ref: '../../../../common/responses/BadRequest.yml' diff --git a/specs/ingestion/paths/tasks/v2/pushTask.yml b/specs/ingestion/paths/tasks/v2/pushTask.yml new file mode 100644 index 00000000000..6c30771b984 --- /dev/null +++ b/specs/ingestion/paths/tasks/v2/pushTask.yml @@ -0,0 +1,21 @@ +post: + tags: + - tasks + summary: Push a `batch` request payload through the Pipeline + description: Push a `batch` request payload through the Pipeline. You can check the status of task pushes with the observability endpoints. + operationId: pushTask + x-acl: + - addObject + - deleteIndex + - editSettings + parameters: + - $ref: '../../../common/parameters.yml#/pathTaskID' + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '../../../../common/schemas/Batch.yml#/batchWriteParams' + '400': + $ref: '../../../../common/responses/BadRequest.yml' diff --git a/specs/ingestion/spec.yml b/specs/ingestion/spec.yml index 6de5a2384d1..53facd48169 100644 --- a/specs/ingestion/spec.yml +++ b/specs/ingestion/spec.yml @@ -147,6 +147,8 @@ paths: $ref: 'paths/tasks/v1/taskID.yml' /1/tasks/{taskID}/run: $ref: 'paths/tasks/v1/runTask.yml' + /1/tasks/{taskID}/push: + $ref: 'paths/tasks/v1/pushTask.yml' /1/tasks/{taskID}/enable: $ref: 'paths/tasks/v1/enableTask.yml' /1/tasks/{taskID}/disable: @@ -159,6 +161,8 @@ paths: $ref: 'paths/tasks/v2/taskID.yml' /2/tasks/{taskID}/run: $ref: 'paths/tasks/v2/runTask.yml' + /2/tasks/{taskID}/push: + $ref: 'paths/tasks/v2/pushTask.yml' /2/tasks/{taskID}/enable: $ref: 'paths/tasks/v2/enableTask.yml' /2/tasks/{taskID}/disable: diff --git a/specs/search/helpers/chunkedBatch.yml b/specs/search/helpers/chunkedBatch.yml index dbe3b85516e..e0139e4a4f3 100644 --- a/specs/search/helpers/chunkedBatch.yml +++ b/specs/search/helpers/chunkedBatch.yml @@ -27,7 +27,7 @@ method: description: The `batch` `action` to perform on the given array of `objects`, defaults to `addObject`. required: false schema: - $ref: '../paths/objects/common/schemas.yml#/action' + $ref: '../../common/schemas/Batch.yml#/action' - in: query name: waitForTasks description: Whether or not we should wait until every `batch` tasks has been processed, this operation may slow the total execution time of this method but is more reliable. diff --git a/specs/search/paths/objects/batch.yml b/specs/search/paths/objects/batch.yml index a27a65f3295..0aa5fa784b4 100644 --- a/specs/search/paths/objects/batch.yml +++ b/specs/search/paths/objects/batch.yml @@ -17,48 +17,7 @@ post: content: application/json: schema: - title: batchWriteParams - description: Batch parameters. - type: object - additionalProperties: false - properties: - requests: - type: array - items: - title: batchRequest - type: object - additionalProperties: false - properties: - action: - $ref: 'common/schemas.yml#/action' - body: - type: object - description: Operation arguments (varies with specified `action`). - example: - name: Betty Jane McCamey - company: Vita Foods Inc. - email: betty@mccamey.com - - required: - - action - - body - required: - - requests - examples: - batch: - summary: Batch indexing request - value: - requests: - - action: addObject - body: - name: Betty Jane McCamey - company: Vita Foods Inc. - email: betty@mccamey.com - - action: addObject - body: - name: Gayla geimer - company: Ortman McCain Co. - email: gayla@geimer.com + $ref: '../../../common/schemas/Batch.yml#/batchWriteParams' responses: '200': description: OK diff --git a/specs/search/paths/objects/common/schemas.yml b/specs/search/paths/objects/common/schemas.yml index 7acf46499ff..63c849da6a6 100644 --- a/specs/search/paths/objects/common/schemas.yml +++ b/specs/search/paths/objects/common/schemas.yml @@ -1,15 +1,3 @@ -action: - type: string - enum: - - addObject - - updateObject - - partialUpdateObject - - partialUpdateObjectNoCreate - - deleteObject - - delete - - clear - description: Type of indexing operation. - builtInOperationType: type: string enum: diff --git a/specs/search/paths/objects/multipleBatch.yml b/specs/search/paths/objects/multipleBatch.yml index e7d695929b3..73c240ca78f 100644 --- a/specs/search/paths/objects/multipleBatch.yml +++ b/specs/search/paths/objects/multipleBatch.yml @@ -26,7 +26,7 @@ post: additionalProperties: false properties: action: - $ref: 'common/schemas.yml#/action' + $ref: '../../../common/schemas/Batch.yml#/action' body: type: object description: Operation arguments (varies with specified `action`). diff --git a/tests/CTS/requests/ingestion/pushTask.json b/tests/CTS/requests/ingestion/pushTask.json new file mode 100644 index 00000000000..9b4ebadae8f --- /dev/null +++ b/tests/CTS/requests/ingestion/pushTask.json @@ -0,0 +1,46 @@ +[ + { + "parameters": { + "batchWriteParams": { + "requests": [ + { + "action": "addObject", + "body": { + "key": "bar", + "foo": "1" + } + }, + { + "action": "addObject", + "body": { + "key": "baz", + "foo": "2" + } + } + ] + } + }, + "request": { + "path": "/2/tasks/6c02aeb1-775e-418e-870b-1faccd4b2c0f/push", + "method": "POST", + "body": { + "requests": [ + { + "action": "addObject", + "body": { + "key": "bar", + "foo": "1" + } + }, + { + "action": "addObject", + "body": { + "key": "baz", + "foo": "2" + } + } + ] + } + } + } +] diff --git a/tests/CTS/requests/ingestion/pushTaskV1.json b/tests/CTS/requests/ingestion/pushTaskV1.json new file mode 100644 index 00000000000..862c33eac11 --- /dev/null +++ b/tests/CTS/requests/ingestion/pushTaskV1.json @@ -0,0 +1,46 @@ +[ + { + "parameters": { + "batchWriteParams": { + "requests": [ + { + "action": "addObject", + "body": { + "key": "bar", + "foo": "1" + } + }, + { + "action": "addObject", + "body": { + "key": "baz", + "foo": "2" + } + } + ] + } + }, + "request": { + "path": "/1/tasks/6c02aeb1-775e-418e-870b-1faccd4b2c0f/push", + "method": "POST", + "body": { + "requests": [ + { + "action": "addObject", + "body": { + "key": "bar", + "foo": "1" + } + }, + { + "action": "addObject", + "body": { + "key": "baz", + "foo": "2" + } + } + ] + } + } + } +] From 14789e9c5b84df65878d31964f004903301c009e Mon Sep 17 00:00:00 2001 From: shortcuts Date: Thu, 25 Jul 2024 11:03:25 +0200 Subject: [PATCH 02/11] fix: params --- specs/ingestion/paths/tasks/v1/pushTask.yml | 10 +++++++++- specs/ingestion/paths/tasks/v2/pushTask.yml | 10 +++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/specs/ingestion/paths/tasks/v1/pushTask.yml b/specs/ingestion/paths/tasks/v1/pushTask.yml index 405f9cb1148..59d28eb8f2a 100644 --- a/specs/ingestion/paths/tasks/v1/pushTask.yml +++ b/specs/ingestion/paths/tasks/v1/pushTask.yml @@ -10,12 +10,20 @@ post: - editSettings parameters: - $ref: '../../../common/parameters.yml#/pathTaskID' + x-codegen-request-body-name: batchWriteParams + requestBody: + description: Request body for creating a task. + content: + application/json: + schema: + $ref: '../../../../common/schemas/Batch.yml#/batchWriteParams' + required: true responses: '200': description: OK content: application/json: schema: - $ref: '../../../../common/schemas/Batch.yml#/batchWriteParams' + $ref: '../../../common/schemas/run.yml#/RunResponse' '400': $ref: '../../../../common/responses/BadRequest.yml' diff --git a/specs/ingestion/paths/tasks/v2/pushTask.yml b/specs/ingestion/paths/tasks/v2/pushTask.yml index 6c30771b984..b4573b8950f 100644 --- a/specs/ingestion/paths/tasks/v2/pushTask.yml +++ b/specs/ingestion/paths/tasks/v2/pushTask.yml @@ -10,12 +10,20 @@ post: - editSettings parameters: - $ref: '../../../common/parameters.yml#/pathTaskID' + x-codegen-request-body-name: batchWriteParams + requestBody: + description: Request body for creating a task. + content: + application/json: + schema: + $ref: '../../../../common/schemas/Batch.yml#/batchWriteParams' + required: true responses: '200': description: OK content: application/json: schema: - $ref: '../../../../common/schemas/Batch.yml#/batchWriteParams' + $ref: '../../../common/schemas/run.yml#/RunResponse' '400': $ref: '../../../../common/responses/BadRequest.yml' From 0ed5e926c78b2d9bf8e50030d9930d0643f14147 Mon Sep 17 00:00:00 2001 From: shortcuts Date: Thu, 25 Jul 2024 11:24:29 +0200 Subject: [PATCH 03/11] fix: parameters --- tests/CTS/requests/ingestion/pushTask.json | 1 + tests/CTS/requests/ingestion/pushTaskV1.json | 1 + 2 files changed, 2 insertions(+) diff --git a/tests/CTS/requests/ingestion/pushTask.json b/tests/CTS/requests/ingestion/pushTask.json index 9b4ebadae8f..49d22a2b1e8 100644 --- a/tests/CTS/requests/ingestion/pushTask.json +++ b/tests/CTS/requests/ingestion/pushTask.json @@ -1,6 +1,7 @@ [ { "parameters": { + "taskID": "6c02aeb1-775e-418e-870b-1faccd4b2c0f", "batchWriteParams": { "requests": [ { diff --git a/tests/CTS/requests/ingestion/pushTaskV1.json b/tests/CTS/requests/ingestion/pushTaskV1.json index 862c33eac11..e53625523f1 100644 --- a/tests/CTS/requests/ingestion/pushTaskV1.json +++ b/tests/CTS/requests/ingestion/pushTaskV1.json @@ -1,6 +1,7 @@ [ { "parameters": { + "taskID": "6c02aeb1-775e-418e-870b-1faccd4b2c0f", "batchWriteParams": { "requests": [ { From ea7607b26ea0f4d08789e462b16a7db55669144c Mon Sep 17 00:00:00 2001 From: shortcuts Date: Thu, 25 Jul 2024 11:50:48 +0200 Subject: [PATCH 04/11] fix: csharp ambiguous --- specs/search/paths/objects/batch.yml | 3 ++- templates/csharp/tests/e2e/e2e.mustache | 5 +++++ templates/csharp/tests/requests/requests.mustache | 5 +++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/specs/search/paths/objects/batch.yml b/specs/search/paths/objects/batch.yml index 0aa5fa784b4..adc6cbbdcc1 100644 --- a/specs/search/paths/objects/batch.yml +++ b/specs/search/paths/objects/batch.yml @@ -12,12 +12,13 @@ post: - Actions are equivalent to the individual API requests of the same name. parameters: - $ref: '../../../common/parameters.yml#/IndexName' + x-codegen-request-body-name: batchWriteParams requestBody: - required: true content: application/json: schema: $ref: '../../../common/schemas/Batch.yml#/batchWriteParams' + required: true responses: '200': description: OK diff --git a/templates/csharp/tests/e2e/e2e.mustache b/templates/csharp/tests/e2e/e2e.mustache index 7ad0e924007..61fcb2a2b94 100644 --- a/templates/csharp/tests/e2e/e2e.mustache +++ b/templates/csharp/tests/e2e/e2e.mustache @@ -8,7 +8,12 @@ using Xunit; using System.Text.Json; using Quibble.Xunit; using dotenv.net; +{{#isSearchClient}} using Action = Algolia.Search.Models.Search.Action; +{{/isSearchClient}} +{{^isSearchClient}} +using Action = Algolia.Search.Models.Ingestion.Action; +{{/isSearchClient}} namespace Algolia.Search.e2e; diff --git a/templates/csharp/tests/requests/requests.mustache b/templates/csharp/tests/requests/requests.mustache index f95002673b6..835ca835c68 100644 --- a/templates/csharp/tests/requests/requests.mustache +++ b/templates/csharp/tests/requests/requests.mustache @@ -8,7 +8,12 @@ using Xunit; using System.Text.Json; using Quibble.Xunit; using dotenv.net; +{{#isSearchClient}} using Action = Algolia.Search.Models.Search.Action; +{{/isSearchClient}} +{{^isSearchClient}} +using Action = Algolia.Search.Models.Ingestion.Action; +{{/isSearchClient}} namespace Algolia.Search.requests; From dbea7e800815a34f138c94391ae3754ec6155dcc Mon Sep 17 00:00:00 2001 From: shortcuts Date: Thu, 25 Jul 2024 11:53:04 +0200 Subject: [PATCH 05/11] fix: swifty nifty annoyingly duplicaty? --- .../main/java/com/algolia/codegen/AlgoliaSwiftGenerator.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/generators/src/main/java/com/algolia/codegen/AlgoliaSwiftGenerator.java b/generators/src/main/java/com/algolia/codegen/AlgoliaSwiftGenerator.java index 78a9f250925..9570a139a08 100644 --- a/generators/src/main/java/com/algolia/codegen/AlgoliaSwiftGenerator.java +++ b/generators/src/main/java/com/algolia/codegen/AlgoliaSwiftGenerator.java @@ -32,6 +32,7 @@ public class AlgoliaSwiftGenerator extends Swift5ClientCodegen { private static final List reservedModelNames = List.of( + "action", "advancedsyntaxfeatures", "alternativesasexact", "anchoring", @@ -44,6 +45,8 @@ public class AlgoliaSwiftGenerator extends Swift5ClientCodegen { "basesearchparams", "basesearchparamswithoutquery", "basesearchresponse", + "batchrequest", + "batchwriteparams", "condition", "configuration", "consequence", From 3420652f757cc2fd64b5f983c0240df5f7e9ec16 Mon Sep 17 00:00:00 2001 From: shortcuts Date: Thu, 25 Jul 2024 13:21:51 +0200 Subject: [PATCH 06/11] chore: maybe this import --- .../Sources/Search/Extra/SearchClientExtension.swift | 1 + templates/csharp/snippets/method.mustache | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/clients/algoliasearch-client-swift/Sources/Search/Extra/SearchClientExtension.swift b/clients/algoliasearch-client-swift/Sources/Search/Extra/SearchClientExtension.swift index 19c158320c5..ad955954291 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Extra/SearchClientExtension.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Extra/SearchClientExtension.swift @@ -9,6 +9,7 @@ import Core #endif import Foundation +import Search.Action public extension SearchClient { /// Wait for a task to complete diff --git a/templates/csharp/snippets/method.mustache b/templates/csharp/snippets/method.mustache index deb8be086a3..e4fbf39bce3 100644 --- a/templates/csharp/snippets/method.mustache +++ b/templates/csharp/snippets/method.mustache @@ -4,7 +4,12 @@ using Algolia.Search.Http; using Algolia.Search.Clients; // IMPORT< using Algolia.Search.Models.{{clientPrefix}}; +{{#isSearchClient}} using Action = Algolia.Search.Models.Search.Action; +{{/isSearchClient}} +{{^isSearchClient}} +using Action = Algolia.Search.Models.Ingestion.Action; +{{/isSearchClient}} public class Snippet{{client}} { From d503f07926b4ea05ea44b1e41778fdc35b5884c8 Mon Sep 17 00:00:00 2001 From: shortcuts Date: Thu, 25 Jul 2024 13:44:14 +0200 Subject: [PATCH 07/11] chore: ok this --- .../Sources/Search/Extra/SearchClientExtension.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clients/algoliasearch-client-swift/Sources/Search/Extra/SearchClientExtension.swift b/clients/algoliasearch-client-swift/Sources/Search/Extra/SearchClientExtension.swift index ad955954291..fff5efcee7b 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Extra/SearchClientExtension.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Extra/SearchClientExtension.swift @@ -9,7 +9,7 @@ import Core #endif import Foundation -import Search.Action +import enum Search.Action public extension SearchClient { /// Wait for a task to complete From 6820f873f6178ecc42bed410c616bb6339d9290f Mon Sep 17 00:00:00 2001 From: shortcuts Date: Thu, 25 Jul 2024 14:01:07 +0200 Subject: [PATCH 08/11] chore: goood --- .../Sources/Search/Extra/SearchClientExtension.swift | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/clients/algoliasearch-client-swift/Sources/Search/Extra/SearchClientExtension.swift b/clients/algoliasearch-client-swift/Sources/Search/Extra/SearchClientExtension.swift index fff5efcee7b..8f00f6d840a 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Extra/SearchClientExtension.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Extra/SearchClientExtension.swift @@ -9,7 +9,6 @@ import Core #endif import Foundation -import enum Search.Action public extension SearchClient { /// Wait for a task to complete @@ -427,7 +426,7 @@ public extension SearchClient { func chunkedBatch( indexName: String, objects: [some Encodable], - action: Action = .addObject, + action: SearchAction = .addObject, waitForTasks: Bool = false, batchSize: Int = 1000, requestOptions: RequestOptions? = nil @@ -440,7 +439,7 @@ public extension SearchClient { for batch in batches { let batchResponse = try await self.batch( indexName: indexName, - batchWriteParams: BatchWriteParams( + batchWriteParams: SearchBatchWriteParams( requests: batch.map { .init(action: action, body: AnyCodable($0)) } From 41894f8224a65c4e6318857e6188a8e584f5a5dd Mon Sep 17 00:00:00 2001 From: shortcuts Date: Thu, 25 Jul 2024 15:15:11 +0200 Subject: [PATCH 09/11] fix: remove v1 push --- specs/ingestion/paths/tasks/v1/pushTask.yml | 29 ------------ specs/ingestion/spec.yml | 2 - tests/CTS/requests/ingestion/pushTaskV1.json | 47 -------------------- 3 files changed, 78 deletions(-) delete mode 100644 specs/ingestion/paths/tasks/v1/pushTask.yml delete mode 100644 tests/CTS/requests/ingestion/pushTaskV1.json diff --git a/specs/ingestion/paths/tasks/v1/pushTask.yml b/specs/ingestion/paths/tasks/v1/pushTask.yml deleted file mode 100644 index 59d28eb8f2a..00000000000 --- a/specs/ingestion/paths/tasks/v1/pushTask.yml +++ /dev/null @@ -1,29 +0,0 @@ -post: - tags: - - tasks - summary: Push a `batch` request payload through the Pipeline - description: Push a `batch` request payload through the Pipeline using the v1 endpoint, please use `pushTask` instead. You can check the status of task pushes with the observability endpoints. - operationId: pushTaskV1 - x-acl: - - addObject - - deleteIndex - - editSettings - parameters: - - $ref: '../../../common/parameters.yml#/pathTaskID' - x-codegen-request-body-name: batchWriteParams - requestBody: - description: Request body for creating a task. - content: - application/json: - schema: - $ref: '../../../../common/schemas/Batch.yml#/batchWriteParams' - required: true - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '../../../common/schemas/run.yml#/RunResponse' - '400': - $ref: '../../../../common/responses/BadRequest.yml' diff --git a/specs/ingestion/spec.yml b/specs/ingestion/spec.yml index 53facd48169..56b12b90e06 100644 --- a/specs/ingestion/spec.yml +++ b/specs/ingestion/spec.yml @@ -147,8 +147,6 @@ paths: $ref: 'paths/tasks/v1/taskID.yml' /1/tasks/{taskID}/run: $ref: 'paths/tasks/v1/runTask.yml' - /1/tasks/{taskID}/push: - $ref: 'paths/tasks/v1/pushTask.yml' /1/tasks/{taskID}/enable: $ref: 'paths/tasks/v1/enableTask.yml' /1/tasks/{taskID}/disable: diff --git a/tests/CTS/requests/ingestion/pushTaskV1.json b/tests/CTS/requests/ingestion/pushTaskV1.json deleted file mode 100644 index e53625523f1..00000000000 --- a/tests/CTS/requests/ingestion/pushTaskV1.json +++ /dev/null @@ -1,47 +0,0 @@ -[ - { - "parameters": { - "taskID": "6c02aeb1-775e-418e-870b-1faccd4b2c0f", - "batchWriteParams": { - "requests": [ - { - "action": "addObject", - "body": { - "key": "bar", - "foo": "1" - } - }, - { - "action": "addObject", - "body": { - "key": "baz", - "foo": "2" - } - } - ] - } - }, - "request": { - "path": "/1/tasks/6c02aeb1-775e-418e-870b-1faccd4b2c0f/push", - "method": "POST", - "body": { - "requests": [ - { - "action": "addObject", - "body": { - "key": "bar", - "foo": "1" - } - }, - { - "action": "addObject", - "body": { - "key": "baz", - "foo": "2" - } - } - ] - } - } - } -] From 3ad7b395285eb7dbcaca05de7fd4f1747746f90e Mon Sep 17 00:00:00 2001 From: shortcuts Date: Thu, 25 Jul 2024 15:21:30 +0200 Subject: [PATCH 10/11] chore: unused param --- specs/ingestion/paths/tasks/v2/pushTask.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/specs/ingestion/paths/tasks/v2/pushTask.yml b/specs/ingestion/paths/tasks/v2/pushTask.yml index b4573b8950f..079d7cc1605 100644 --- a/specs/ingestion/paths/tasks/v2/pushTask.yml +++ b/specs/ingestion/paths/tasks/v2/pushTask.yml @@ -10,7 +10,6 @@ post: - editSettings parameters: - $ref: '../../../common/parameters.yml#/pathTaskID' - x-codegen-request-body-name: batchWriteParams requestBody: description: Request body for creating a task. content: From 73b9db6f48d3e61809075df4612754d121535e89 Mon Sep 17 00:00:00 2001 From: shortcuts Date: Thu, 25 Jul 2024 16:07:07 +0200 Subject: [PATCH 11/11] chore: def --- specs/ingestion/paths/tasks/v2/pushTask.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specs/ingestion/paths/tasks/v2/pushTask.yml b/specs/ingestion/paths/tasks/v2/pushTask.yml index 079d7cc1605..b1dc799f843 100644 --- a/specs/ingestion/paths/tasks/v2/pushTask.yml +++ b/specs/ingestion/paths/tasks/v2/pushTask.yml @@ -11,7 +11,7 @@ post: parameters: - $ref: '../../../common/parameters.yml#/pathTaskID' requestBody: - description: Request body for creating a task. + description: Request body of a Search API `batch` request that will be pushed in the Connectors pipeline. content: application/json: schema: