Croway opened a new pull request, #27683: URL: https://github.com/apache/camel/pull/27683
Backport of #27629 to camel-4.22.x (minimal). JIRA: https://issues.apache.org/jira/browse/CAMEL-25494 On camel-4.22.x a route configuration is dumped as YAML (`camel.main.dumpRoutes=yaml`, `camel validate normalize`) with its `onException`, `onCompletion`, `intercept`, `interceptFrom` and `interceptSendToEndpoint` items unwrapped, and with the uri pattern of an interceptor split into `parameters`. The YAML DSL does not load that dump (`RouteConfigurationDefinitionDeserializer` reads these items with `wrapItem = true`). ## Changes Production code as in #27629: - `model-yaml-writer.vm`: the `$wrapItems` list and the `doWriteWrappedChildList` branch. camel-4.22.x has no `$yamlKeys` (CAMEL-25255 is not backported), so the only conflict was that neighbouring line; `YamlModelWriter` is regenerated from the template of this branch. - `YamlModelWriterSupport.doWriteWrappedChildList`, and `keepUriPattern` in `LwModelToYAMLDumper`: identical to #27629. Tests: only the expected output of the existing `YamlModelWriterTest.testRouteConfiguration` (`yaml-routeconfig.yaml`) is updated, as on main. The round-trip test of #27629 (`RouteConfigurationYamlDumpTest`, camel-yaml-dsl) is not ported: on this branch it would have to be a Spock spec, and camel-yaml-dsl needs camel-yaml-io as a test dependency, which the backport #27610 adds. I ran it locally as a temporary Spock spec: it passes with this change, and without it the dump fails the YAML DSL schema validation (`/0/routeConfiguration/onException/0: property 'exception' is not defined in the schema`, `interceptSendToEndpoint/0: property 'parameters' ...`). The camel-yaml-io tests pass. Not a straight cherry-pick (template conflict resolved by hand, test not ported), so it needs a normal review. Draft until #27629 is merged. _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]
