<schema>
<schema> contains an inline JSON Schema Draft 2020-12 document for a webhook or event trigger.
Why use it
Use it to reject invalid input before WOML admits a run, keeping malformed data out of workflow context and durable execution history.
Common use cases
- Require fields in a webhook body.
- Restrict additional properties.
- Validate data published to a named event.
Syntax
WOML
<schema>
{
"type": "object",
"required": ["orderId"],
"properties": {
"orderId": { "type": "string" }
},
"additionalProperties": false
}
</schema>Rules and behavior
- It is valid inside
<webhook>or<event>and may occur once. - Invalid source schema prevents activation.
- Invalid webhook input returns HTTP 400 with
WOML_TRIGGER_SCHEMA_INVALIDand creates no run. - The first literal
</schema>ends the inline body. - External schema-file references are unsupported in v1.