Croway opened a new pull request, #27818: URL: https://github.com/apache/camel/pull/27818
Fixes https://issues.apache.org/jira/browse/CAMEL-25555 `camel validate normalize a.yaml b.yaml --output out/` merged every route into one `normalized.yaml` (only Kamelets got a file each). Since CAMEL-25490 a top-level `onException` is dumped before the first route, so in the merged file the handler of `b.yaml` also applied to the routes of `a.yaml`, and two files with a handler for the same exception silently kept the last one. The dump strategy logs a WARN for it, but the command runs with that log off. - With a directory `--output`, one normalized file per input file, keeping the input's name; same-named inputs are prefixed with their parent directory (`orders/routes.yaml` becomes `orders-routes.yaml`), still-clashing names are numbered. Elements not tied to a resource go to `normalized.yaml` next to them. A directory name ending in `/` is created. Kamelets as before. - With a file output or no `--output`, the routes are still merged, and the command prints a WARN when a top-level `onException` of one file ends up applying to the routes of another, with the hint to use a directory. - `NormalizeDumpRoutesStrategy` extends `DefaultDumpRoutesStrategy` to dump once per resource and once merged; core is untouched. Each run uses its own temp work directory instead of the fixed `.camel-jbang/normalize-output.yaml`. - Docs: the option description, `camel-jbang-validation.adoc` ("Normalizing several files"), the 4.23 upgrade guide. Found on the way, not fixed here: the YAML dumper drops a top-level `errorHandler` and `intercept` and writes a top-level `onCompletion` as a route step, so today only `onException` can trigger the warning. Tests: `YamlNormalize*Test` in camel-jbang-plugin-validate (11 tests). _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]
