[
https://issues.apache.org/jira/browse/CAMEL-24745?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18115485#comment-18115485
]
Guillaume Nodet commented on CAMEL-24745:
-----------------------------------------
This issue is being investigated by a coding agent (on behalf of gnodet).
Preliminary analysis confirms the inconsistency: the canonical schema
(camelYamlDsl-canonical.json) accepts top-level from: because
RouteFromDefinitionDeserializer carries the @YamlIn annotation, but the runtime
(YamlRoutesBuilderLoader.doConfigure()) emits a compact-notation warning when
it encounters an OutputAwareFromDefinition at the top level. So camel validate
yaml --canonical says OK while camel run warns. The fix decision is: either (a)
treat top-level from: as compact notation and update the schema/validator
accordingly, or (b) remove the warning since the form is schema-valid.
Documentation already favors route: form (1917 vs 36 occurrences), pointing
toward option (a).
A fix session has been dispatched.
_Note: This comment was generated by an AI coding agent and requires manual
verification._
> 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
> Assignee: Guillaume Nodet
> Priority: Major
>
> 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)