Skip to content

Commit 0b7a400

Browse files
committed
feat(specs): update try transformation specs for no-code
1 parent 680d82c commit 0b7a400

File tree

3 files changed

+39
-7
lines changed

3 files changed

+39
-7
lines changed

specs/ingestion/common/schemas/transformation.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,10 @@ TransformationTry:
153153
properties:
154154
code:
155155
$ref: '#/Code'
156+
type:
157+
$ref: '#/TransformationType'
158+
input:
159+
$ref: '#/TransformationInput'
156160
sampleRecord:
157161
description: The record to apply the given code to.
158162
type: object
@@ -161,7 +165,8 @@ TransformationTry:
161165
items:
162166
$ref: './authentication.yml#/AuthenticationCreate'
163167
required:
164-
- code
168+
- type
169+
- input
165170
- sampleRecord
166171

167172
TransformationTryResponse:

tests/CTS/requests/ingestion/tryTransformation.json

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
[
22
{
3+
"testName": "with legacy payload",
34
"parameters": {
45
"code": "foo",
56
"sampleRecord": {
@@ -17,10 +18,31 @@
1718
}
1819
}
1920
},
21+
{
22+
"parameters": {
23+
"type": "code",
24+
"input": {"code": "foo"},
25+
"sampleRecord": {
26+
"bar": "baz"
27+
}
28+
},
29+
"request": {
30+
"path": "/1/transformations/try",
31+
"method": "POST",
32+
"body": {
33+
"type": "code",
34+
"input": {"code": "foo"},
35+
"sampleRecord": {
36+
"bar": "baz"
37+
}
38+
}
39+
}
40+
},
2041
{
2142
"testName": "with authentications",
2243
"parameters": {
23-
"code": "foo",
44+
"type": "code",
45+
"input": {"code": "foo"},
2446
"sampleRecord": {
2547
"bar": "baz"
2648
},
@@ -40,7 +62,8 @@
4062
"path": "/1/transformations/try",
4163
"method": "POST",
4264
"body": {
43-
"code": "foo",
65+
"type": "code",
66+
"input": {"code": "foo"},
4467
"sampleRecord": {
4568
"bar": "baz"
4669
},

tests/CTS/requests/ingestion/tryTransformationBeforeUpdate.json

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
"parameters": {
44
"transformationID": "6c02aeb1-775e-418e-870b-1faccd4b2c0f",
55
"transformationTry": {
6-
"code": "foo",
6+
"type": "code",
7+
"input": {"code": "foo"},
78
"sampleRecord": {
89
"bar": "baz"
910
}
@@ -13,7 +14,8 @@
1314
"path": "/1/transformations/6c02aeb1-775e-418e-870b-1faccd4b2c0f/try",
1415
"method": "POST",
1516
"body": {
16-
"code": "foo",
17+
"type": "code",
18+
"input": {"code": "foo"},
1719
"sampleRecord": {
1820
"bar": "baz"
1921
}
@@ -25,7 +27,8 @@
2527
"parameters": {
2628
"transformationID": "6c02aeb1-775e-418e-870b-1faccd4b2c0f",
2729
"transformationTry": {
28-
"code": "foo",
30+
"type": "code",
31+
"input": {"code": "foo"},
2932
"sampleRecord": {
3033
"bar": "baz"
3134
},
@@ -46,7 +49,8 @@
4649
"path": "/1/transformations/6c02aeb1-775e-418e-870b-1faccd4b2c0f/try",
4750
"method": "POST",
4851
"body": {
49-
"code": "foo",
52+
"type": "code",
53+
"input": {"code": "foo"},
5054
"sampleRecord": {
5155
"bar": "baz"
5256
},

0 commit comments

Comments
 (0)