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

   Fixes https://issues.apache.org/jira/browse/CAMEL-25539
   
   The EIP and language answers of `camel_catalog_doc` listed the model options 
and said nothing about where the element is written in YAML nor the shape of an 
option that is not a scalar. In an evaluation of coding agents, sessions that 
read the onException doc then wrote `onException` as a step inside `steps`, 
`handled: true` (a boolean where an expression is expected) and the XPath 
namespaces as a string or as `{prefix: uri}` maps; 44 of 53 validator calls 
failed on exactly these.
   
   - The EIP answer carries `placement`, from `CatalogSamples.placement`: 
"top-level entry: a list item at the same level as route or from, not a step" 
for onException, errorHandler, routeConfiguration, onCompletion, intercept; "a 
part of X" for when, doCatch, redeliveryPolicy; "a step inside the steps of a 
route" for the others. Plus a `sampleHint` that `camel_catalog_sample` returns 
a validated example.
   - `optionToJson` adds a `yaml` hint, derived from the option metadata only 
(never from option names): for an expression option (`handled: {constant: 
"true"}`, `correlationExpression: {header: myKey}`), for a single predicate 
element (`onWhen: {simple: "${header.foo} == 'bar'"}`), and for a list of 
`PropertyDefinition` (`namespace: [{key: c, value: 
"http://acme.com/cheese"}]`). The xpath, xquery and xtokenize language answers 
get the namespace shape the same way.
   - Three tests in `CatalogDocsTest`; the last one puts the hints of the real 
answers into a YAML file and runs it through 
`SourceValidator.validateCamelYaml`, so the hints cannot drift from what the 
DSL accepts.
   
   Tests: `CatalogDocs*Test` and the `commands.ai` package of camel-jbang-core.
   
   _Claude Code on behalf of Croway_
   


-- 
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