davsclaus commented on PR #27715: URL: https://github.com/apache/camel/pull/27715#issuecomment-6144220859
Thanks for trying it out. Both points: **1. Routes without `routeId`:** fixed in f49a87ea0ccd. For the JSON dump, `TransformJavaRoutes.dump()` now assigns the route ids (`RouteDefinitionHelper.forceAssignIds`) and the step ids before dumping, as starting Camel would. A route id that is a property placeholder is kept as it is (`ignoreMissingProperty`), because the context has no properties. I added two tests with a named route and an unnamed route in one file, one for route-diagram and one for route-structure. Both fail without the change. The YAML/XML path of `camel transform route` is unchanged, so its output does not gain generated ids. A null check in `DefaultModelToStructureDumper` itself would be a separate camel-core change; I left it out of this PR. **2. The note with `--json`:** agreed that a tool needs to know the output is partial. In this PR I can't send the note to stderr: today `printer().printErr(...)` writes `ERROR: ...` to **stdout** (`Printer.printErr` -> `printf`), so it would break the JSON. Sending errors and warnings to stderr, and a clean `--json` document on stdout, is the CLI-wide change CAMEL-25389 (under CAMEL-25388, 4.24.0). I'll move this note to that warning channel there. _Claude Code on behalf of @davsclaus._ -- 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]
