[ 
https://issues.apache.org/jira/browse/CAMEL-24723?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen updated CAMEL-24723:
--------------------------------
    Fix Version/s: 4.23.0

> camel-jbang - camel validate yaml --canonical reports the deprecated compact 
> notation as such; the runtime WARN covers implicit expressions
> -------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-24723
>                 URL: https://issues.apache.org/jira/browse/CAMEL-24723
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-jbang, camel-yaml-dsl
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Major
>             Fix For: 4.23.0
>
>
> The classic compact notation of the YAML DSL (a step as a string {{log: 
> "..."}}, a language as a string {{simple: "..."}}, a language key directly on 
> the EIP {{setBody: {simple: ...}}}) is deprecated; the canonical format is 
> the explicit form ({{log: {message: "..."}}}, {{setBody: {expression: 
> {simple: {expression: "..."}}}}}). Two things say so today, neither well:
> * {{camel validate yaml --canonical}} rejects the compact notation but 
> reports the raw schema errors: "property 'simple' is not defined in the 
> schema and the schema does not allow additional properties", "string found, 
> object expected". Nothing says it is the deprecated notation, what the 
> canonical form of that line is, or that {{camel validate normalize}} rewrites 
> the file.
> * The runtime WARN ("YAML DSL compact notation detected", 
> {{YamlDeserializationContext.warnCompactNotationOnce}}) fires for a scalar 
> step or language and for a top-level {{from:}}, but not for a language key 
> directly on the EIP ({{setBody: {simple: {expression: ...}}}}), the most 
> common compact pattern, which loads silently.
> Make the validator say what it found: one message per occurrence, naming the 
> node, that it is the deprecated compact notation, the canonical form to 
> write, and the normalize command. And have the deserializers warn for the 
> implicit expression too, so {{camel run}} and the validator agree on what the 
> compact notation is.
> Follows CAMEL-24722.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to