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

   ## Summary
   
   First step of 
[CAMEL-24693](https://issues.apache.org/jira/browse/CAMEL-24693): fix the EIP 
documentation YAML examples that the YAML DSL runtime rejects, so they can 
later ship as validated samples in camel-catalog.
   
   18 YAML examples on 12 EIP pages were written in the XML child shape, with 
`onFallback`, `resilience4jConfiguration`, `faultToleranceConfiguration`, 
`onWhen` and the `*LoadBalancer` element placed inside `steps`. The YAML DSL 
deserializer rejects that:
   
   ```
   Error constructing YAML node id: org.apache.camel.model.ProcessorDefinition
   ```
   
   Each is now a property of its parent (`circuitBreaker`, `doCatch`, 
`loadBalance`), which is the form the generated `ModelDeserializers` and the 
JSON schema accept, and the form the camel-yaml-dsl tests use:
   
   ```yaml
   - loadBalance:
       failoverLoadBalancer:
         maximumFailoverAttempts: 10
         roundRobin: "true"
       steps:
         - to:
             uri: http:service1
   ```
   
   The aggregate example on the KeyValueRepository page used the Camel 3 
`strategyRef` and `aggregationRepositoryRef` attribute names in both the XML 
and the YAML tab; both are now `aggregationStrategy` and 
`aggregationRepository`.
   
   ## Pages
   
   circuitBreaker, resilience4j, fault-tolerance, doTry, keyValueRepository, 
customLoadBalancer, failoverLoadBalancer, randomLoadBalancer, 
roundRobinLoadBalancer, stickyLoadBalancer, topicLoadBalancer, 
weightedLoadBalancer. The catalog doc mirror under 
`catalog/camel-catalog/src/generated` is regenerated.
   
   ## Verification
   
   - Before: all 18 examples fail `CamelYamlParser` (camel-yaml-dsl-validator) 
at deserialization.
   - After: all 18 load and start in a `CamelContext` with camel-resilience4j 
and camel-http-base on the classpath.
   - `camel validate yaml` no longer reports any structural error on these 
pages. The remaining messages are the scalar-type cases handled by CAMEL-24694 
(#26351) and the schema gaps now tracked in 
[CAMEL-24697](https://issues.apache.org/jira/browse/CAMEL-24697) 
(`inheritErrorHandler` on `circuitBreaker` / `failoverLoadBalancer`, resequence 
`expression:` oneOf, jaxb `contextPath`).
   
   Docs only, no code change.
   
   _Claude Code on behalf of davsclaus_
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


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