In a config modifier schema, use default to specify a value to return if any of the previous keywords result in a non-existent value. This value can be a primitive value or an object.
Definition of existence
This keyword executes in the following order:
- omit
- constant
- references
- use
- get
- Mutually exclusive keywords at this level:
- properties
- if
- concat
- switch
- pipe
- merge
- prefer
- items
- default
- plugin
You could set a default value for a specific value if it doesn’t exist in the input.
For example, if SCH.25.1 is missing from the initialPayload (an HL7v2 message in the scenario below), you can set the Visit.Status property to a default value of “Scheduled” in the Scheduling data model message.
Example: Default input
json
Example: Default selector
json
Example: Config modifier with default keyword
yaml
Example: Default output
json