From cdd673d33886c99d1bca478776b7d45585873fa6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Vannicatte?= Date: Mon, 5 Aug 2024 15:49:16 +0200 Subject: [PATCH] fix(specs): ingestion destinations and transformations (#3477) --- specs/ingestion/common/schemas/common.yml | 5 ++++ .../ingestion/common/schemas/destination.yml | 6 ++++ .../paths/transformations/transformations.yml | 2 ++ .../requests/ingestion/createDestination.json | 28 ++++++++++++++++++- tests/CTS/requests/ingestion/listRuns.json | 1 - tests/CTS/requests/ingestion/listSources.json | 1 - .../ingestion/listTransformations.json | 1 - 7 files changed, 40 insertions(+), 4 deletions(-) diff --git a/specs/ingestion/common/schemas/common.yml b/specs/ingestion/common/schemas/common.yml index d6075e3ba5..ddf2dd9d3a 100644 --- a/specs/ingestion/common/schemas/common.yml +++ b/specs/ingestion/common/schemas/common.yml @@ -55,6 +55,11 @@ taskID: description: Universally unique identifier (UUID) of a task. example: 6c02aeb1-775e-418e-870b-1faccd4b2c0f +transformationIDs: + type: array + items: + $ref: '#/transformationID' + transformationID: type: string # format: uuid diff --git a/specs/ingestion/common/schemas/destination.yml b/specs/ingestion/common/schemas/destination.yml index b4b13a7311..0a7dbc5082 100644 --- a/specs/ingestion/common/schemas/destination.yml +++ b/specs/ingestion/common/schemas/destination.yml @@ -17,6 +17,8 @@ Destination: $ref: './common.yml#/updatedAt' authenticationID: $ref: './common.yml#/authenticationID' + transformationIDs: + $ref: './common.yml#/transformationIDs' required: - destinationID - type @@ -37,6 +39,8 @@ DestinationCreate: $ref: '#/DestinationInput' authenticationID: $ref: './common.yml#/authenticationID' + transformationIDs: + $ref: './common.yml#/transformationIDs' required: - type - name @@ -71,6 +75,8 @@ DestinationUpdate: $ref: '#/DestinationInput' authenticationID: $ref: './common.yml#/authenticationID' + transformationIDs: + $ref: './common.yml#/transformationIDs' DestinationUpdateResponse: type: object diff --git a/specs/ingestion/paths/transformations/transformations.yml b/specs/ingestion/paths/transformations/transformations.yml index 098d10eafa..fd06bdc3eb 100644 --- a/specs/ingestion/paths/transformations/transformations.yml +++ b/specs/ingestion/paths/transformations/transformations.yml @@ -9,6 +9,8 @@ get: - deleteIndex - editSettings parameters: + - $ref: '../../common/parameters.yml#/itemsPerPage' + - $ref: '../../common/parameters.yml#/page' - $ref: '../../common/parameters.yml#/sort' - $ref: '../../common/parameters.yml#/order' responses: diff --git a/tests/CTS/requests/ingestion/createDestination.json b/tests/CTS/requests/ingestion/createDestination.json index 0670315943..68090258a0 100644 --- a/tests/CTS/requests/ingestion/createDestination.json +++ b/tests/CTS/requests/ingestion/createDestination.json @@ -1,6 +1,5 @@ [ { - "testName": "createDestination", "parameters": { "type": "search", "name": "destinationName", @@ -21,5 +20,32 @@ "authenticationID": "6c02aeb1-775e-418e-870b-1faccd4b2c0f" } } + }, + { + "testName": "with transformationIDs", + "parameters": { + "type": "search", + "name": "destinationName", + "input": { + "indexPrefix": "prefix_" + }, + "transformationIDs": [ + "6c02aeb1-775e-418e-870b-1faccd4b2c0f" + ] + }, + "request": { + "path": "/1/destinations", + "method": "POST", + "body": { + "type": "search", + "name": "destinationName", + "input": { + "indexPrefix": "prefix_" + }, + "transformationIDs": [ + "6c02aeb1-775e-418e-870b-1faccd4b2c0f" + ] + } + } } ] diff --git a/tests/CTS/requests/ingestion/listRuns.json b/tests/CTS/requests/ingestion/listRuns.json index dad4ee0877..a583b3e3ac 100644 --- a/tests/CTS/requests/ingestion/listRuns.json +++ b/tests/CTS/requests/ingestion/listRuns.json @@ -1,6 +1,5 @@ [ { - "testName": "getRuns", "parameters": {}, "request": { "path": "/1/runs", diff --git a/tests/CTS/requests/ingestion/listSources.json b/tests/CTS/requests/ingestion/listSources.json index c42529dfd2..fb53759f57 100644 --- a/tests/CTS/requests/ingestion/listSources.json +++ b/tests/CTS/requests/ingestion/listSources.json @@ -1,6 +1,5 @@ [ { - "testName": "getSources", "parameters": {}, "request": { "path": "/1/sources", diff --git a/tests/CTS/requests/ingestion/listTransformations.json b/tests/CTS/requests/ingestion/listTransformations.json index 35ffa3d0ea..67469b47ed 100644 --- a/tests/CTS/requests/ingestion/listTransformations.json +++ b/tests/CTS/requests/ingestion/listTransformations.json @@ -1,6 +1,5 @@ [ { - "testName": "getTransformations", "parameters": {}, "request": { "path": "/1/transformations",