-
Notifications
You must be signed in to change notification settings - Fork 14
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 transformations endpoints to ingestion (#3215)
- Loading branch information
Showing
15 changed files
with
455 additions
and
0 deletions.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
Transformation: | ||
type: object | ||
additionalProperties: false | ||
properties: | ||
transformationID: | ||
$ref: './common.yml#/transformationID' | ||
code: | ||
$ref: '#/Code' | ||
name: | ||
$ref: '#/Name' | ||
description: | ||
$ref: '#/Description' | ||
createdAt: | ||
$ref: './common.yml#/createdAt' | ||
updatedAt: | ||
$ref: './common.yml#/updatedAt' | ||
required: | ||
- transformationID | ||
- code | ||
- name | ||
- description | ||
- createdAt | ||
|
||
Code: | ||
type: string | ||
description: The source code of the transformation. | ||
|
||
Name: | ||
type: string | ||
description: The uniquely identified name of your transformation. | ||
|
||
Description: | ||
type: string | ||
description: A descriptive name for your transformation of what it does. | ||
|
||
TransformationCreate: | ||
type: object | ||
additionalProperties: false | ||
description: API request body for creating a transformation. | ||
properties: | ||
code: | ||
$ref: '#/Code' | ||
name: | ||
$ref: '#/Name' | ||
description: | ||
$ref: '#/Description' | ||
required: | ||
- code | ||
- name | ||
- description | ||
|
||
TransformationCreateResponse: | ||
type: object | ||
additionalProperties: false | ||
description: API response for creating a transformation. | ||
properties: | ||
transformationID: | ||
$ref: './common.yml#/transformationID' | ||
createdAt: | ||
$ref: './common.yml#/createdAt' | ||
required: | ||
- transformationID | ||
- createdAt | ||
|
||
TransformationUpdateResponse: | ||
type: object | ||
description: API response for updating a transformation. | ||
additionalProperties: false | ||
properties: | ||
transformationID: | ||
$ref: './common.yml#/transformationID' | ||
updatedAt: | ||
$ref: './common.yml#/updatedAt' | ||
required: | ||
- transformationID | ||
- updatedAt | ||
|
||
TransformationSearch: | ||
type: object | ||
additionalProperties: false | ||
properties: | ||
transformationsIDs: | ||
type: array | ||
items: | ||
$ref: './common.yml#/transformationID' | ||
required: | ||
- transformationsIDs | ||
|
||
TransformationTry: | ||
type: object | ||
additionalProperties: false | ||
properties: | ||
code: | ||
$ref: '#/Code' | ||
sampleRecord: | ||
description: The record to apply the given code to. | ||
type: object | ||
required: | ||
- code | ||
- sampleRecord | ||
|
||
TransformationTryResponse: | ||
type: object | ||
additionalProperties: false | ||
properties: | ||
payloads: | ||
type: array | ||
description: The array of records returned by the transformation service. | ||
items: | ||
type: object | ||
error: | ||
type: object | ||
description: The error if the transformation failed. | ||
properties: | ||
code: | ||
description: The error status code. | ||
type: integer | ||
message: | ||
description: A descriptive message explaining the failure. | ||
type: string | ||
required: | ||
- payloads |
63 changes: 63 additions & 0 deletions
63
specs/ingestion/paths/transformations/transformationID.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,63 @@ | ||
get: | ||
tags: | ||
- transformations | ||
summary: Retrieve a transformation | ||
description: Retrieves a transformation by its ID. | ||
operationId: getTransformation | ||
x-acl: | ||
- addObject | ||
- deleteIndex | ||
- editSettings | ||
parameters: | ||
- $ref: '../../common/parameters.yml#/pathTransformationID' | ||
responses: | ||
'200': | ||
description: OK | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '../../common/schemas/transformation.yml#/Transformation' | ||
'400': | ||
$ref: '../../../common/responses/BadRequest.yml' | ||
|
||
put: | ||
tags: | ||
- transformations | ||
summary: Update a transformation | ||
description: Updates a transformation by its ID. | ||
operationId: updateTransformation | ||
parameters: | ||
- $ref: '../../common/parameters.yml#/pathTransformationID' | ||
requestBody: | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '../../common/schemas/transformation.yml#/TransformationCreate' | ||
required: true | ||
responses: | ||
'200': | ||
description: OK | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '../../common/schemas/transformation.yml#/TransformationUpdateResponse' | ||
'400': | ||
$ref: '../../../common/responses/BadRequest.yml' | ||
|
||
delete: | ||
tags: | ||
- transformations | ||
summary: Delete a transformation | ||
description: Deletes a transformation by its ID. | ||
operationId: deleteTransformation | ||
parameters: | ||
- $ref: '../../common/parameters.yml#/pathTransformationID' | ||
responses: | ||
'200': | ||
description: OK | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '../../common/schemas/common.yml#/DeleteResponse' | ||
'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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
get: | ||
tags: | ||
- transformations | ||
summary: List transformations | ||
description: Retrieves a list of transformations. | ||
operationId: getTransformations | ||
x-acl: | ||
- addObject | ||
- deleteIndex | ||
- editSettings | ||
parameters: | ||
- $ref: '../../common/parameters.yml#/sort' | ||
- $ref: '../../common/parameters.yml#/order' | ||
responses: | ||
'200': | ||
description: OK | ||
content: | ||
application/json: | ||
schema: | ||
title: listTransformationsResponse | ||
type: object | ||
description: Configured transformations and pagination information. | ||
additionalProperties: false | ||
properties: | ||
transformations: | ||
type: array | ||
items: | ||
$ref: '../../common/schemas/transformation.yml#/Transformation' | ||
pagination: | ||
$ref: '../../common/schemas/pagination.yml#/Pagination' | ||
required: | ||
- transformations | ||
- pagination | ||
'400': | ||
$ref: '../../../common/responses/BadRequest.yml' | ||
|
||
post: | ||
tags: | ||
- transformations | ||
summary: Create a transformation | ||
description: Creates a new transformation. | ||
operationId: createTransformation | ||
requestBody: | ||
description: Request body for creating a transformation. | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '../../common/schemas/transformation.yml#/TransformationCreate' | ||
required: true | ||
responses: | ||
'200': | ||
description: OK | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '../../common/schemas/transformation.yml#/TransformationCreateResponse' | ||
'400': | ||
$ref: '../../../common/responses/BadRequest.yml' |
28 changes: 28 additions & 0 deletions
28
specs/ingestion/paths/transformations/transformationsSearch.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,28 @@ | ||
post: | ||
tags: | ||
- transformations | ||
summary: Search for transformations | ||
description: Searches for transformations. | ||
operationId: searchTransformations | ||
x-acl: | ||
- addObject | ||
- deleteIndex | ||
- editSettings | ||
requestBody: | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '../../common/schemas/transformation.yml#/TransformationSearch' | ||
required: true | ||
responses: | ||
'200': | ||
description: OK | ||
content: | ||
application/json: | ||
schema: | ||
title: searchTransformationsResponse | ||
type: array | ||
items: | ||
$ref: '../../common/schemas/transformation.yml#/Transformation' | ||
'400': | ||
$ref: '../../../common/responses/BadRequest.yml' |
25 changes: 25 additions & 0 deletions
25
specs/ingestion/paths/transformations/transformationsTry.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,25 @@ | ||
post: | ||
tags: | ||
- transformations | ||
summary: Search for transformations | ||
description: Searches for transformations. | ||
operationId: tryTransformations | ||
x-acl: | ||
- addObject | ||
- deleteIndex | ||
- editSettings | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
[ | ||
{ | ||
"parameters": { | ||
"code": "foo", | ||
"name": "bar", | ||
"description": "baz" | ||
}, | ||
"request": { | ||
"path": "/1/transformations", | ||
"method": "POST", | ||
"body": { | ||
"code": "foo", | ||
"name": "bar", | ||
"description": "baz" | ||
} | ||
} | ||
} | ||
] |
Oops, something went wrong.
b7ae19f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉 Published on https://api-clients-automation.netlify.app as production
🚀 Deployed on https://667535d0dd68c847d5fc2799--api-clients-automation.netlify.app