Skip to content

SWITCH

Evaluate the discriminant field (source) and run the operations of the first matching case. Falls back to default operations when no case matches.

Parameters

  • cases (array of operations, optional) — Cases to match against the discriminant value.
  • default (array of operations, optional) — Operations to run when no case matches.

JSON Configuration

{
"id": "op-switch",
"type": "condition",
"action": "switch",
"params": {
"cases": [
{
"type": "validation",
"action": "required",
"params": {}
},
{
"type": "validation",
"action": "required",
"params": {}
}
],
"default": [
{
"type": "validation",
"action": "required",
"params": {}
},
{
"type": "validation",
"action": "required",
"params": {}
}
]
}
}