Skip to content

Commit 2344274

Browse files
authored
feat(specs): Add MappingInput to Task Inputs (#2787)
1 parent 734705c commit 2344274

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed

specs/ingestion/common/schemas/task.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,61 @@ SubscriptionTrigger:
266266

267267
# Task input
268268

269+
MappingFieldDirective:
270+
type: object
271+
additionalProperties: false
272+
description: Describes how a field should be resolved by applying a set of directives.
273+
properties:
274+
fieldKey:
275+
description: Destination field key.
276+
type: string
277+
value:
278+
type: object
279+
additionalProperties: true
280+
description: How the destination field should be resolved from the source.
281+
required:
282+
- fieldKey
283+
- value
284+
285+
MappingKitAction:
286+
type: object
287+
additionalProperties: false
288+
description: Describes how a destination object should be resolved by means of applying a set of directives.
289+
properties:
290+
id:
291+
description: ID to uniquely identify this action.
292+
type: string
293+
enabled:
294+
description: Whether this action has any effect.
295+
type: boolean
296+
trigger:
297+
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.
298+
type: string
299+
fieldDirectives:
300+
type: array
301+
items:
302+
$ref: '#/MappingFieldDirective'
303+
required:
304+
- enabled
305+
- trigger
306+
- fieldDirectives
307+
308+
MappingInput:
309+
type: object
310+
additionalProperties: false
311+
description: Transformations to apply to source, serialized as a JSON string.
312+
properties:
313+
format:
314+
description: Name of the mapping format schema, `mappingkit/v1` is currently the only supported format.
315+
type: string
316+
actions:
317+
type: array
318+
items:
319+
$ref: '#/MappingKitAction'
320+
required:
321+
- format
322+
- actions
323+
269324
OnDemandDateUtilsInput:
270325
type: object
271326
additionalProperties: false
@@ -277,6 +332,8 @@ OnDemandDateUtilsInput:
277332
endDate:
278333
description: The end date of the extraction (RFC3339 format).
279334
type: string
335+
mapping:
336+
$ref: '#/MappingInput'
280337
required:
281338
- startDate
282339
- endDate
@@ -291,6 +348,8 @@ ScheduleDateUtilsInput:
291348
type: integer
292349
minimum: 1
293350
maximum: 30
351+
mapping:
352+
$ref: '#/MappingInput'
294353
required:
295354
- timeframe
296355

0 commit comments

Comments
 (0)