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

   _Claude Code on behalf of davsclaus_
   
   JIRA: https://issues.apache.org/jira/browse/CAMEL-25206
   
   The XML and Java DSL writers have round-trip tests over route corpora; the 
YAML DSL had none (`XmlToYamlTest` in camel-yaml-io only checks the YAML is not 
empty).
   
   `YamlRoundTripTest` (camel-yaml-dsl, which has both the YAML writer and 
reader) reads the XML routes of camel-xml-io and camel-core's model tests, 
dumps each as YAML, loads it back with the YAML DSL (schema-validated), and 
compares both models dumped as XML. camel-xml-io is added as a test dependency.
   
   124 of 133 routes read back. The two gaps it found are fixed:
   
   - **Route properties**: the YAML dumper writes `routeProperty`, but the YAML 
DSL rejected it (`unsupported field: routeProperty`). The route deserializer 
now reads it; the YAML schemas and the catalog copy are regenerated.
   - **XML namespace order**: namespaces read as a `namespace` list lost their 
order because `NamespaceAwareExpression.getNamespaceAsMap()` collected them in 
a `HashMap`; now a `LinkedHashMap`, as the copy constructor already uses.
   
   The routes left differ by design and are listed with the reason in the test:
   - `kamelet`, `saga`, `transacted` with no steps of their own: in YAML they 
take the steps after them (flow mode, as in the Java DSL), where the XML corpus 
keeps them apart.
   - `interceptFrom` inside a route: YAML reads it as the interceptFrom of all 
routes.
   
   Tests: camel-yaml-dsl (457), camel-core-model, camel-xml-io, camel-yaml-io, 
camel-java-io all pass.
   
   🤖 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