Claus Ibsen created CAMEL-24707:
-----------------------------------
Summary: camel-yaml-dsl - the JSON schema should mark the
expression required on the expression nodes (split, filter, setBody, ...)
Key: CAMEL-24707
URL: https://issues.apache.org/jira/browse/CAMEL-24707
Project: Camel
Issue Type: Improvement
Components: camel-yaml-dsl
Reporter: Claus Ibsen
The generated YAML DSL JSON schema (camelYamlDsl.json) leaves the expression
optional on every expression node: each of split, filter, when, setBody,
setHeader, setProperty, setVariable, transform, script, validate, delay,
throttle, loop, recipientList, routingSlip, dynamicRouter, resequence,
idempotentConsumer, enrich, pollEnrich, sort... is a oneOf of the inline
language keys, an expression: property, or "none of them". So
- split:
delimiter: ","
steps: [...]
validates and fails when the route is created with "Unsupported definition:
null" (the reifier gets a null ExpressionDefinition).
Found on 2026-09-13 while benchmarking AI-assisted route authoring: models
write split, filter and setBody with only options and the validator, Kaoto and
the IDE plugins accept it.
To analyze which expression nodes require the expression and mark it required
in the schema so every consumer of the schema benefits. First pass from the
model classes:
- ExpressionNode subclasses: Delay, DynamicRouter, Enrich, PollEnrich,
RecipientList, RoutingSlip, Script, SetBody, SetHeader, SetProperty,
SetVariable, Sort, Throttle, Transform, Validate
- OutputExpressionNode subclasses: Filter, Split, Loop, When,
WhenSkipSendToEndpoint, Resequence (batch config), IdempotentConsumer...
All of them need the expression at runtime except sort (expression optional,
defaults to the body). Loop needs it in both modes (count and doWhile). Enrich
and pollEnrich need it as the endpoint expression. aggregate is not an
expression node; its correlationExpression is a separate required property.
Until the schema is fixed, camel-yaml-dsl-validator has a post-check
(CAMEL-24698) that reports an expression node without an expression.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)