-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(specs): add authentications to ingestion transformations (#3494)
- Loading branch information
Showing
6 changed files
with
152 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
specs/ingestion/paths/transformations/transformationTryID.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
post: | ||
tags: | ||
- transformations | ||
summary: Try a transformation | ||
description: Try a transformation before updating it. | ||
operationId: tryTransformationBeforeUpdate | ||
x-acl: | ||
- addObject | ||
- deleteIndex | ||
- editSettings | ||
parameters: | ||
- $ref: '../../common/parameters.yml#/pathTransformationID' | ||
requestBody: | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '../../common/schemas/transformation.yml#/TransformationTry' | ||
required: true | ||
responses: | ||
'200': | ||
description: OK | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '../../common/schemas/transformation.yml#/TransformationTryResponse' | ||
'400': | ||
$ref: '../../../common/responses/BadRequest.yml' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
67 changes: 67 additions & 0 deletions
67
tests/CTS/requests/ingestion/tryTransformationBeforeUpdate.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
[ | ||
{ | ||
"parameters": { | ||
"transformationID": "6c02aeb1-775e-418e-870b-1faccd4b2c0f", | ||
"transformationTry": { | ||
"code": "foo", | ||
"sampleRecord": { | ||
"bar": "baz" | ||
} | ||
} | ||
}, | ||
"request": { | ||
"path": "/1/transformations/6c02aeb1-775e-418e-870b-1faccd4b2c0f/try", | ||
"method": "POST", | ||
"body": { | ||
"code": "foo", | ||
"sampleRecord": { | ||
"bar": "baz" | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"testName": "existing with authentications", | ||
"parameters": { | ||
"transformationID": "6c02aeb1-775e-418e-870b-1faccd4b2c0f", | ||
"transformationTry": { | ||
"code": "foo", | ||
"sampleRecord": { | ||
"bar": "baz" | ||
}, | ||
"authentications": [ | ||
{ | ||
"type": "oauth", | ||
"name": "authName", | ||
"input": { | ||
"url": "http://test.oauth", | ||
"client_id": "myID", | ||
"client_secret": "mySecret" | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
"request": { | ||
"path": "/1/transformations/6c02aeb1-775e-418e-870b-1faccd4b2c0f/try", | ||
"method": "POST", | ||
"body": { | ||
"code": "foo", | ||
"sampleRecord": { | ||
"bar": "baz" | ||
}, | ||
"authentications": [ | ||
{ | ||
"type": "oauth", | ||
"name": "authName", | ||
"input": { | ||
"url": "http://test.oauth", | ||
"client_id": "myID", | ||
"client_secret": "mySecret" | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} | ||
] |