Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(specs): Add MappingInput to Task Inputs #2787

Merged
merged 3 commits into from
Mar 4, 2024
Merged
Changes from all 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
59 changes: 59 additions & 0 deletions specs/ingestion/common/schemas/task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,61 @@ SubscriptionTrigger:

# Task input

MappingFieldDirective:
type: object
additionalProperties: false
description: Describes how a field should be resolved by applying a set of directives.
properties:
fieldKey:
description: Destination field key.
type: string
value:
jsok marked this conversation as resolved.
Show resolved Hide resolved
type: object
additionalProperties: true
jsok marked this conversation as resolved.
Show resolved Hide resolved
description: How the destination field should be resolved from the source.
required:
- fieldKey
- value

MappingKitAction:
type: object
additionalProperties: false
description: Describes how a destination object should be resolved by means of applying a set of directives.
properties:
id:
description: ID to uniquely identify this action.
type: string
enabled:
description: Whether this action has any effect.
type: boolean
trigger:
description: Condition which must be satisfied to apply the action. If this evaluates to false, the action is not applied, and the process attempts to apply the next action, if any.
type: string
fieldDirectives:
type: array
items:
$ref: '#/MappingFieldDirective'
required:
- enabled
- trigger
- fieldDirectives

MappingInput:
jonathaningram marked this conversation as resolved.
Show resolved Hide resolved
type: object
additionalProperties: false
description: Transformations to apply to source, serialized as a JSON string.
properties:
format:
description: Name of the mapping format schema, `mappingkit/v1` is currently the only supported format.
type: string
actions:
jsok marked this conversation as resolved.
Show resolved Hide resolved
type: array
items:
$ref: '#/MappingKitAction'
required:
- format
- actions

OnDemandDateUtilsInput:
type: object
additionalProperties: false
Expand All @@ -277,6 +332,8 @@ OnDemandDateUtilsInput:
endDate:
description: The end date of the extraction (RFC3339 format).
type: string
mapping:
$ref: '#/MappingInput'
required:
- startDate
- endDate
Expand All @@ -291,6 +348,8 @@ ScheduleDateUtilsInput:
type: integer
minimum: 1
maximum: 30
mapping:
$ref: '#/MappingInput'
required:
- timeframe

Expand Down
Loading