davsclaus opened a new pull request, #27598: URL: https://github.com/apache/camel/pull/27598
https://issues.apache.org/jira/browse/CAMEL-25485 Follow-up of CAMEL-24826. `SimpleChecks.checkText` returned early for any text starting with `resource:`, as the expression is then loaded from a file. But the location is a Simple template itself, so a ternary written outside `${...}` in it is literal text and was not reported: ```yaml - setBody: simple: "resource:file:${exchangeProperty.CamelTimerCounter} == 1 ? order.json : order-bad-email.json" ``` At runtime the route failed with `Cannot load resource file:2 == 1 ? order.json : order-bad-email.json`. In the local-model benchmark (transform-groovy step 3) the model got only that runtime message and failed the step in 3 of 5 runs. For a `resource:` text, the content's syntax check is still skipped, but the top-level ternary check now runs on the text, with the existing CAMEL-24826 message (`camel validate` and the MCP write tool). The right form, `resource:file:${exchangeProperty.CamelTimerCounter == 1 ? 'order.json' : 'order-bad-email.json'}`, and a plain `resource:classpath:script.txt` are not reported. Tests: 2 new in `SourceValidatorSimpleTest` (29 pass); the `SourceValidator*`, `CatalogSamplesTest` and `AuthoringToolsTest` suites pass. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01STT6whBgK1AqsSsUKrnE8m -- 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]
