davsclaus opened a new pull request, #27699: URL: https://github.com/apache/camel/pull/27699
Jira: https://issues.apache.org/jira/browse/CAMEL-25560 A key written twice in one mapping passed validation. The validator reads the YAML into a Jackson tree, where the last value wins, and the YAML DSL loads the route the same way, so the first value was lost without a word. Found in the local-model benchmark: an edit added a new `message:` under a `log:` and left the old one, so the route logged the old message; another file had two `when:` keys in one `choice`, so one branch was gone. The validator now reports each repeated key with both lines, before the schema errors: ``` line 7: message: is given twice in this log: (lines 6 and 7); YAML keeps only the last one, so the message: at line 6 is lost: write message: once, with the value you mean ``` The check walks the snakeyaml-engine nodes (`YamlPointerLines.root`), which keep both keys; `<<:` merge keys are left alone. The validator Maven plugin does not fail the build on errors by default (`failOnError=false`). Tests: `DuplicateKeyTest` (4 tests); the module's 231 tests pass, including the EIP and user manual doc example tests. 🤖 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]
