davsclaus opened a new pull request, #26401:
URL: https://github.com/apache/camel/pull/26401

   https://issues.apache.org/jira/browse/CAMEL-24722
   
   The hints that say what to write (CAMEL-24698, CAMEL-24702) showed the 
classic shorthand: `handled: {constant: "true"}`, `setBody: {simple: "..."}`, 
`split: {tokenize: ","}`, and the deserializer's "an expression is written with 
the language as the key: simple: ...". The 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.
   
   Rewritten in the canonical format:
   - `camel-yaml-dsl-validator` `YamlValidator`: `EXPRESSION_EXAMPLES` and the 
expression, plain-value, script-in-language, bean, onException and set* messages
   - `camel-yaml-dsl-common` `YamlDeserializationContext`: the unknown-field 
hint
   - `camel-yaml-dsl-maven-plugin` `GenerateYamlDeserializersMojo`: the 
plain-value message (`ExpressionDeserializers` regenerated)
   - `camel-jbang` `EndpointChecks`: the timer body and several-endpoints hints
   
   The tests that assert on these messages follow 
(`YamlValidatorExpressionHintTest`, `YamlValidatorPropertyHintTest`, 
`OnExceptionTest`). Verified: camel-yaml-dsl-validator 91/91, the yaml-dsl 
`OnExceptionTest`, and the camel-jbang `SourceValidator*` tests.
   
   Not in this PR: the YAML the MCP scaffold tools (`OpenApiTools`, 
`AiPipelineScaffoldTools`) and the camel-jbang templates generate is also in 
the shorthand; that is a separate change, as is a clearer report of the 
deprecated notation in `camel validate yaml --canonical` (its output today is 
raw schema errors).
   
   Noticed while reviewing #26397, whose examples are canonical.
   
   _Claude Code on behalf of davsclaus_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to