You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "davsclaus (via GitHub)" <gi...@apache.org> on 2026/10/07 04:05:41 UTC

[PR] CAMEL-25402: camel-yaml-dsl-validator - Say how to write expression: when it is given text instead of a language [camel]

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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-25402: camel-yaml-dsl-validator - Say how to write expression: when it is given text instead of a language [camel]

Posted by "davsclaus (via GitHub)" <gi...@apache.org>.
davsclaus merged PR #27471:
URL: https://github.com/apache/camel/pull/27471


-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-25402: camel-yaml-dsl-validator - Say how to write expression: when it is given text instead of a language [camel]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #27471:
URL: https://github.com/apache/camel/pull/27471#issuecomment-6030701101

   :star2: Thank you for your contribution to the Apache Camel project! :star2:
     :robot: CI automation will test this PR automatically.
   
     :camel: Apache Camel Committers, please review the following items:
   
     * First-time contributors **require MANUAL approval** for the GitHub Actions to run
     * You can use the command `/component-test (camel-)component-name1 (camel-)component-name2..` to request a test from the test bot although they are normally detected and executed by CI.
     * You can label PRs using `skip-tests` and `test-dependents` to fine-tune the checks executed by this PR.
     * Build and test logs are available in the summary page. **Only** [Apache Camel committers](https://camel.apache.org/community/team/#committers) have access to the summary.
     
     :warning: Be careful when sharing logs. Review their contents before sharing them publicly.


-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-25402: camel-yaml-dsl-validator - Say how to write expression: when it is given text instead of a language [camel]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #27471:
URL: https://github.com/apache/camel/pull/27471#issuecomment-6030993973

   <!-- ci-tested-modules -->
   :test_tube: **CI tested the following changed modules:**
   
   - `dsl/camel-yaml-dsl/camel-yaml-dsl-validator`
   
   :repeat: **1 test passed only after a retry on JDK 25** (1 retried attempt)
   
   <details><summary>Recovered flaky tests on JDK 25 (1)</summary>
   
   | Module | Test | Failed attempts | First failure |
   | --- | --- | --- | --- |
   | `dsl/camel-jbang/camel-jbang-plugin-tui` | `AiPanelAcpTest.usageUpdateFeedsTheTokenCounter` | 1 | 1234 + the 66 this turn added ==&gt; expected: &lt;1300&gt; but was: &lt;1234&gt; |
   
   > :information_source: These tests did **not** fail the build. Surefire retried them and they passed.
   > Retries are enabled project-wide by `surefire.rerunFailingTestsCount` in `parent/pom.xml`.
   
   </details>
   
   ---
   
   <details><summary>:microscope: Scalpel shadow comparison — Scalpel: 8 of 699 tested, 9 compile-only — current: 8 all tested</summary>
   
   [Maveniverse Scalpel](https://github.com/maveniverse/scalpel) detected **8 affected modules** (current approach: 8).
   
   **Skip-tests mode would test 8 modules** (1 direct + 7 downstream), **skip tests for 9** (generated code, meta-modules)
   
   <details><summary>Modules Scalpel would test (8)</summary>
   
   - `camel-jbang-mcp` ← downstream of org.apache.camel:camel-yaml-dsl-validator
   - `camel-jbang-plugin-mcp` ← downstream of org.apache.camel:camel-jbang-core
   - `camel-jbang-plugin-route-parser` ← downstream of org.apache.camel:camel-jbang-core
   - `camel-jbang-plugin-tui` ← downstream of org.apache.camel:camel-yaml-dsl-validator
   - `camel-jbang-plugin-validate` ← downstream of org.apache.camel:camel-yaml-dsl-validator
   - `camel-launcher-container` ← downstream of org.apache.camel:camel-launcher
   - `camel-yaml-dsl-validator` ← dsl/camel-yaml-dsl/camel-yaml-dsl-validator/src/main/java/org/apache/camel/dsl/yaml/validator/SchemaHints.java, dsl/camel-yaml-dsl/camel-yaml-dsl-validator/src/test/java/org/apache/camel/dsl/yaml/validator/YamlValidatorExpressionHintTest.java
   - `camel-yaml-dsl-validator-maven-plugin` ← downstream of org.apache.camel:camel-yaml-dsl-validator
   
   </details>
   
   <details><summary>Modules with tests skipped (9)</summary>
   
   - `camel-jbang-core`
   - `camel-jbang-it`
   - `camel-jbang-main`
   - `camel-jbang-plugin-edit`
   - `camel-jbang-plugin-generate`
   - `camel-jbang-plugin-kubernetes`
   - `camel-jbang-plugin-test`
   - `camel-launcher`
   - `coverage`
   
   </details>
   
   > :information_source: Shadow mode — Scalpel observes but does not affect test execution. [Learn more](https://github.com/maveniverse/scalpel)
   
   </details>
   
   <details><summary>All tested modules (17 modules, 3m 6s total)</summary>
   
   **Total reactor time:** 3m 6s
   
   | Module | Duration | Status |
   | --- | --- | --- |
   | Camel :: Launcher | 53.5s | SUCCESS |
   | Camel :: JBang :: MCP | 42.2s | SUCCESS |
   | Camel :: JBang :: Plugin :: Validate | 22.1s | SUCCESS |
   | Camel :: YAML DSL :: Validator | 21.9s | SUCCESS |
   | Camel :: JBang :: Plugin :: Kubernetes | 18.2s | SUCCESS |
   | Camel :: JBang :: Plugin :: Testing | 10.9s | SUCCESS |
   | Camel :: Coverage | 4.9s | SUCCESS |
   | Camel :: YAML DSL :: Validator Maven Plugin | 3.4s | SUCCESS |
   | Camel :: JBang :: Plugin :: Generate | 1.6s | SUCCESS |
   | Camel :: JBang :: Plugin :: MCP | 1.6s | SUCCESS |
   | Camel :: JBang :: Plugin :: Edit | 1.5s | SUCCESS |
   | Camel :: JBang :: Integration tests | 1.2s | SUCCESS |
   | Camel :: JBang :: Plugin :: Route Parser | 1.1s | SUCCESS |
   | Camel :: JBang :: Main | 0.9s | SUCCESS |
   | Camel :: Launcher :: Container | 0.8s | SUCCESS |
   | Camel :: JBang :: Core | n/a |  |
   | Camel :: JBang :: Plugin :: TUI | n/a |  |
   
   **Top 20 slowest modules:**
   - `Camel :: Launcher` (53.5s)
   - `Camel :: JBang :: MCP` (42.2s)
   - `Camel :: JBang :: Plugin :: Validate` (22.1s)
   - `Camel :: YAML DSL :: Validator` (21.9s)
   - `Camel :: JBang :: Plugin :: Kubernetes` (18.2s)
   - `Camel :: JBang :: Plugin :: Testing` (10.9s)
   - `Camel :: Coverage` (4.9s)
   - `Camel :: YAML DSL :: Validator Maven Plugin` (3.4s)
   - `Camel :: JBang :: Plugin :: Generate` (1.6s)
   - `Camel :: JBang :: Plugin :: MCP` (1.6s)
   - `Camel :: JBang :: Plugin :: Edit` (1.5s)
   - `Camel :: JBang :: Integration tests` (1.2s)
   - `Camel :: JBang :: Plugin :: Route Parser` (1.1s)
   - `Camel :: JBang :: Main` (0.9s)
   - `Camel :: Launcher :: Container` (0.8s)
   
   </details>
   
   ---
   :gear: [View full build and test results](https://github.com/apache/camel/actions/runs/37569803441)


-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org