davsclaus opened a new pull request, #27471: URL: https://github.com/apache/camel/pull/27471
## Description https://issues.apache.org/jira/browse/CAMEL-25402 When the `expression:` key of an EIP is given text instead of a language, the validator reported the error twice as `expression: string found, object expected`, with no hint: ```yaml - split: expression: "${body}" - setHeader: name: CamelHttpResponseCode expression: constant 404 ``` It now reports it once, with the language map to write: ``` a plain value (constant 404) found, a language expected: expression: holds the language as its key, write expression: {constant: {expression: "404"}} ``` `simple` when the text contains `${`, `constant` otherwise, and a language name in front of the text (`constant 404`) is used as the language. The existing hint for expression options (`handled`, `completionSizeExpression`, ...) is unchanged. Found in the local model benchmark (qwen3.6:35b-a3b through the camel-jbang-mcp server): in the r6 ladder run the model met this message in 10 steps and rewrote the same YAML 92 times, failing csv-to-json and openapi-server steps. ## Tests `YamlValidatorExpressionHintTest`: split with `expression: "${body}"`, setHeader with `expression: constant 404` (classic and canonical mode, the hint once, no "object expected" left), and the language form accepted. camel-yaml-dsl-validator: 220 tests 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]
