Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 53 additions & 2 deletions specs/ingestion/common/schemas/transformation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@ Transformation:
authenticationIDs:
$ref: '#/AuthenticationIDs'
code:
deprecated: true
$ref: '#/Code'
type:
$ref: '#/TransformationType'
input:
$ref: '#/TransformationInput'
name:
$ref: '#/Name'
description:
Expand All @@ -25,9 +30,49 @@ Transformation:
- createdAt
- updatedAt

TransformationType:
type: string
description: The type of transformation, which can be either 'code' or 'noCode'.
enum:
- code
- noCode

TransformationInput:
description: The input for the transformation, which can be either code or a no-code configuration.
oneOf:
- $ref: '#/TransformationCode'
- $ref: '#/TransformationNoCode'

TransformationCode:
type: object
additionalProperties: false
description: Input for a transformation that contains the source code of the transformation.
properties:
code:
type: string
description: The source code of the transformation.
required:
- code

TransformationNoCode:
type: object
additionalProperties: false
description: Input for a no-code transformation that contains a series of steps.
properties:
steps:
type: array
items:
$ref: '#/TransformationNoCodeStep'
required:
- steps

TransformationNoCodeStep:
type: object
description: A step in a no-code transformation.

Code:
type: string
description: The source code of the transformation.
description: It is deprecated. Use the `input` field with proper `type` instead to specify the transformation code.

Name:
type: string
Expand All @@ -49,16 +94,22 @@ TransformationCreate:
description: API request body for creating a transformation.
properties:
code:
deprecated: true
$ref: '#/Code'
name:
$ref: '#/Name'
type:
$ref: '#/TransformationType'
input:
$ref: '#/TransformationInput'
description:
$ref: '#/Description'
authenticationIDs:
$ref: '#/AuthenticationIDs'
required:
- code
- name
- type
- input

TransformationCreateResponse:
type: object
Expand Down
6 changes: 4 additions & 2 deletions tests/CTS/requests/ingestion/createTransformation.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
[
{
"parameters": {
"code": "foo",
"input": {"code": "foo"},
"type": "code",
"name": "bar",
"description": "baz"
},
"request": {
"path": "/1/transformations",
"method": "POST",
"body": {
"code": "foo",
"input": {"code": "foo"},
"type": "code",
"name": "bar",
"description": "baz"
}
Expand Down
6 changes: 4 additions & 2 deletions tests/CTS/requests/ingestion/updateTransformation.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"parameters": {
"transformationID": "6c02aeb1-775e-418e-870b-1faccd4b2c0f",
"transformationCreate": {
"code": "foo",
"input": {"code": "foo"},
"type": "code",
"name": "bar",
"description": "baz"
}
Expand All @@ -13,7 +14,8 @@
"path": "/1/transformations/6c02aeb1-775e-418e-870b-1faccd4b2c0f",
"method": "PUT",
"body": {
"code": "foo",
"input": {"code": "foo"},
"type": "code",
"name": "bar",
"description": "baz"
}
Expand Down