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

Claus Ibsen resolved CAMEL-24722.
---------------------------------
    Resolution: Fixed

> camel-yaml-dsl - the validator and deserializer hints recommend the classic 
> shorthand; write them in the canonical YAML format
> ------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-24722
>                 URL: https://issues.apache.org/jira/browse/CAMEL-24722
>             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 hints that say what to write (CAMEL-24698, CAMEL-24702) recommend the 
> classic shorthand: {{handled: {constant: "true"}}}, {{setBody: {simple: 
> "..."}}}, {{filter: {simple: "..."}}}, {{split: {tokenize: ","}}}, and the 
> deserializer's "an expression is written with the language as the key: 
> simple: "..."". The classic shorthand is deprecated; the canonical format 
> (yaml-dsl page, Canonical Schema) is the explicit {{expression:}} wrapper 
> with the language's {{expression:}} key, which is what tooling, IDEs and AI 
> assistants consume. A hint that recommends the deprecated form teaches the 
> wrong thing, and it is what an AI agent editing a route follows.
> Write the hints in the canonical format:
> * camel-yaml-dsl-validator {{YamlValidator}}: {{EXPRESSION_EXAMPLES}} and the 
> expression, plain-value, script-in-language, onException and set* messages
> * camel-yaml-dsl-common {{YamlDeserializationContext}}: the unknown-field hint
> * camel-jbang {{EndpointChecks}}: the timer body and multiple-URI hints
> The tests that assert on these messages follow. The YAML the MCP scaffold 
> tools ({{OpenApiTools}}, {{AiPipelineScaffoldTools}}) and the camel-jbang 
> templates generate is written in the shorthand as well; that is a separate 
> change.
> Noticed while reviewing PR 26397, whose examples are canonical.



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

Reply via email to