Claus Ibsen created CAMEL-24745:
-----------------------------------
Summary: camel-yaml-dsl - decide whether a top-level from:
(without route:) is the compact notation: the runtime warns on it, the
canonical schema accepts it
Key: CAMEL-24745
URL: https://issues.apache.org/jira/browse/CAMEL-24745
Project: Camel
Issue Type: Task
Components: camel-yaml-dsl
Reporter: Claus Ibsen
The runtime WARN for the compact notation
({{YamlDeserializationContext.warnCompactNotationOnce}}) fires for a top-level
{{- from:}} without {{- route:}} ({{YamlRoutesBuilderLoader.doConfigure}}, the
{{OutputAwareFromDefinition}} case), while the canonical schema
({{camelYamlDsl-canonical.json}}) lists {{from}} among its top-level entries
and {{camel validate yaml --canonical}} accepts it (CAMEL-24723). So {{camel
run}} and the validator disagree on this one shape.
Decide which is right and align the other:
* if a top-level {{from:}} is compact, the canonical schema generator drops
{{from}} from the top-level entries, and the validator reports it with the
canonical form ({{- route: {from: {uri: ..., steps: [...]}}}}) the way it
reports the other shapes
* if it is not, the loader stops warning on it
The documentation examples went to {{- route:}} in CAMEL-24710 (1917 {{-
route:}} against 36 {{- from:}} in the catalog docs now), which points to the
first.
Noted on CAMEL-24723.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)