File tree Expand file tree Collapse file tree 6 files changed +152
-1
lines changed
tests/CTS/requests/ingestion Expand file tree Collapse file tree 6 files changed +152
-1
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,8 @@ Transformation:
4
4
properties :
5
5
transformationID :
6
6
$ref : ' ./common.yml#/transformationID'
7
+ authenticationIDs :
8
+ $ref : ' #/AuthenticationIDs'
7
9
code :
8
10
$ref : ' #/Code'
9
11
name :
@@ -32,6 +34,12 @@ Description:
32
34
type : string
33
35
description : A descriptive name for your transformation of what it does.
34
36
37
+ AuthenticationIDs :
38
+ description : The authentications associated for the current transformation.
39
+ type : array
40
+ items :
41
+ $ref : ' ./common.yml#/authenticationID'
42
+
35
43
TransformationCreate :
36
44
type : object
37
45
additionalProperties : false
@@ -43,6 +51,8 @@ TransformationCreate:
43
51
$ref : ' #/Name'
44
52
description :
45
53
$ref : ' #/Description'
54
+ authenticationIDs :
55
+ $ref : ' #/AuthenticationIDs'
46
56
required :
47
57
- code
48
58
- name
@@ -93,6 +103,10 @@ TransformationTry:
93
103
sampleRecord :
94
104
description : The record to apply the given code to.
95
105
type : object
106
+ authentications :
107
+ type : array
108
+ items :
109
+ $ref : ' ./authentication.yml#/AuthenticationCreate'
96
110
required :
97
111
- code
98
112
- sampleRecord
Original file line number Diff line number Diff line change
1
+ post :
2
+ tags :
3
+ - transformations
4
+ summary : Try a transformation
5
+ description : Try a transformation before updating it.
6
+ operationId : tryTransformationBeforeUpdate
7
+ x-acl :
8
+ - addObject
9
+ - deleteIndex
10
+ - editSettings
11
+ parameters :
12
+ - $ref : ' ../../common/parameters.yml#/pathTransformationID'
13
+ requestBody :
14
+ content :
15
+ application/json :
16
+ schema :
17
+ $ref : ' ../../common/schemas/transformation.yml#/TransformationTry'
18
+ required : true
19
+ responses :
20
+ ' 200 ' :
21
+ description : OK
22
+ content :
23
+ application/json :
24
+ schema :
25
+ $ref : ' ../../common/schemas/transformation.yml#/TransformationTryResponse'
26
+ ' 400 ' :
27
+ $ref : ' ../../../common/responses/BadRequest.yml'
Original file line number Diff line number Diff line change 2
2
tags :
3
3
- transformations
4
4
summary : Try a transformation
5
- description : Try a transformation.
5
+ description : Try a transformation before creating it .
6
6
operationId : tryTransformation
7
7
x-acl :
8
8
- addObject
Original file line number Diff line number Diff line change @@ -179,6 +179,8 @@ paths:
179
179
$ref : ' paths/transformations/transformationsModels.yml'
180
180
/1/transformations/{transformationID} :
181
181
$ref : ' paths/transformations/transformationID.yml'
182
+ /1/transformations/{transformationID}/try :
183
+ $ref : ' paths/transformations/transformationTryID.yml'
182
184
183
185
# observability API.
184
186
/1/runs :
Original file line number Diff line number Diff line change 16
16
}
17
17
}
18
18
}
19
+ },
20
+ {
21
+ "testName" : " with authentications" ,
22
+ "parameters" : {
23
+ "code" : " foo" ,
24
+ "sampleRecord" : {
25
+ "bar" : " baz"
26
+ },
27
+ "authentications" : [
28
+ {
29
+ "type" : " oauth" ,
30
+ "name" : " authName" ,
31
+ "input" : {
32
+ "url" : " http://test.oauth" ,
33
+ "client_id" : " myID" ,
34
+ "client_secret" : " mySecret"
35
+ }
36
+ }
37
+ ]
38
+ },
39
+ "request" : {
40
+ "path" : " /1/transformations/try" ,
41
+ "method" : " POST" ,
42
+ "body" : {
43
+ "code" : " foo" ,
44
+ "sampleRecord" : {
45
+ "bar" : " baz"
46
+ },
47
+ "authentications" : [
48
+ {
49
+ "type" : " oauth" ,
50
+ "name" : " authName" ,
51
+ "input" : {
52
+ "url" : " http://test.oauth" ,
53
+ "client_id" : " myID" ,
54
+ "client_secret" : " mySecret"
55
+ }
56
+ }
57
+ ]
58
+ }
59
+ }
19
60
}
20
61
]
Original file line number Diff line number Diff line change
1
+ [
2
+ {
3
+ "parameters" : {
4
+ "transformationID" : " 6c02aeb1-775e-418e-870b-1faccd4b2c0f" ,
5
+ "transformationTry" : {
6
+ "code" : " foo" ,
7
+ "sampleRecord" : {
8
+ "bar" : " baz"
9
+ }
10
+ }
11
+ },
12
+ "request" : {
13
+ "path" : " /1/transformations/6c02aeb1-775e-418e-870b-1faccd4b2c0f/try" ,
14
+ "method" : " POST" ,
15
+ "body" : {
16
+ "code" : " foo" ,
17
+ "sampleRecord" : {
18
+ "bar" : " baz"
19
+ }
20
+ }
21
+ }
22
+ },
23
+ {
24
+ "testName" : " existing with authentications" ,
25
+ "parameters" : {
26
+ "transformationID" : " 6c02aeb1-775e-418e-870b-1faccd4b2c0f" ,
27
+ "transformationTry" : {
28
+ "code" : " foo" ,
29
+ "sampleRecord" : {
30
+ "bar" : " baz"
31
+ },
32
+ "authentications" : [
33
+ {
34
+ "type" : " oauth" ,
35
+ "name" : " authName" ,
36
+ "input" : {
37
+ "url" : " http://test.oauth" ,
38
+ "client_id" : " myID" ,
39
+ "client_secret" : " mySecret"
40
+ }
41
+ }
42
+ ]
43
+ }
44
+ },
45
+ "request" : {
46
+ "path" : " /1/transformations/6c02aeb1-775e-418e-870b-1faccd4b2c0f/try" ,
47
+ "method" : " POST" ,
48
+ "body" : {
49
+ "code" : " foo" ,
50
+ "sampleRecord" : {
51
+ "bar" : " baz"
52
+ },
53
+ "authentications" : [
54
+ {
55
+ "type" : " oauth" ,
56
+ "name" : " authName" ,
57
+ "input" : {
58
+ "url" : " http://test.oauth" ,
59
+ "client_id" : " myID" ,
60
+ "client_secret" : " mySecret"
61
+ }
62
+ }
63
+ ]
64
+ }
65
+ }
66
+ }
67
+ ]
You can’t perform that action at this time.
0 commit comments