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/09/14 09:58:08 UTC
[PR] CAMEL-24722: camel-yaml-dsl - the validator and deserializer hints recommend the canonical YAML format, not the deprecated shorthand [camel]
davsclaus opened a new pull request, #26401:
URL: https://github.com/apache/camel/pull/26401
https://issues.apache.org/jira/browse/CAMEL-24722
The hints that say what to write (CAMEL-24698, CAMEL-24702) showed the classic shorthand: `handled: {constant: "true"}`, `setBody: {simple: "..."}`, `split: {tokenize: ","}`, and the deserializer's "an expression is written with the language as the key: simple: ...". The shorthand is deprecated; the canonical format (yaml-dsl page, Canonical Schema) is the explicit `expression:` wrapper with the language's `expression:` key, which is what tooling, IDEs and AI assistants consume. A hint that recommends the deprecated form teaches the wrong thing, and it is what an AI agent editing a route follows.
Rewritten in the canonical format:
- `camel-yaml-dsl-validator` `YamlValidator`: `EXPRESSION_EXAMPLES` and the expression, plain-value, script-in-language, bean, onException and set* messages
- `camel-yaml-dsl-common` `YamlDeserializationContext`: the unknown-field hint
- `camel-yaml-dsl-maven-plugin` `GenerateYamlDeserializersMojo`: the plain-value message (`ExpressionDeserializers` regenerated)
- `camel-jbang` `EndpointChecks`: the timer body and several-endpoints hints
The tests that assert on these messages follow (`YamlValidatorExpressionHintTest`, `YamlValidatorPropertyHintTest`, `OnExceptionTest`). Verified: camel-yaml-dsl-validator 91/91, the yaml-dsl `OnExceptionTest`, and the camel-jbang `SourceValidator*` tests.
Not in this PR: the YAML the MCP scaffold tools (`OpenApiTools`, `AiPipelineScaffoldTools`) and the camel-jbang templates generate is also in the shorthand; that is a separate change, as is a clearer report of the deprecated notation in `camel validate yaml --canonical` (its output today is raw schema errors).
Noticed while reviewing #26397, whose examples are canonical.
_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: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] CAMEL-24722: camel-yaml-dsl - the validator and deserializer hints recommend the canonical YAML format, not the deprecated shorthand [camel]
Posted by "davsclaus (via GitHub)" <gi...@apache.org>.
davsclaus merged PR #26401:
URL: https://github.com/apache/camel/pull/26401
--
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-24722: camel-yaml-dsl - the validator and deserializer hints recommend the canonical YAML format, not the deprecated shorthand [camel]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #26401:
URL: https://github.com/apache/camel/pull/26401#issuecomment-5662225170
: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-24722: camel-yaml-dsl - the validator and deserializer hints recommend the canonical YAML format, not the deprecated shorthand [camel]
Posted by "davsclaus (via GitHub)" <gi...@apache.org>.
davsclaus commented on code in PR #26401:
URL: https://github.com/apache/camel/pull/26401#discussion_r4007907002
##########
dsl/camel-yaml-dsl/camel-yaml-dsl-common/src/main/java/org/apache/camel/dsl/yaml/common/YamlDeserializationContext.java:
##########
@@ -415,9 +415,10 @@ private Object construct(Node node, String id, ConstructNode constructor) {
? e.getProblem().substring("Unsupported field: ".length()) : null;
String hint = "";
if ("bean".equals(field)) {
- hint = " (the bean language is written as method: {ref: myBean, method: process})";
+ hint = " (the bean language is written as expression: {method: {ref: myBean, method: process}})";
} else if ("expression".equals(field) || "language".equals(field)) {
- hint = " (an expression is written with the language as the key: simple: \"...\", constant: \"...\")";
+ hint = " (an expression is written as expression: with the language as the key: expression: {simple:"
+ + " {expression: \"...\"}}, expression: {constant: {expression: \"...\"}})";
Review Comment:
Applied in d00c7c6671c8, thanks. _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: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] CAMEL-24722: camel-yaml-dsl - the validator and deserializer hints recommend the canonical YAML format, not the deprecated shorthand [camel]
Posted by "gnodet-bot (via GitHub)" <gi...@apache.org>.
gnodet-bot commented on code in PR #26401:
URL: https://github.com/apache/camel/pull/26401#discussion_r4004084804
##########
dsl/camel-yaml-dsl/camel-yaml-dsl-common/src/main/java/org/apache/camel/dsl/yaml/common/YamlDeserializationContext.java:
##########
@@ -415,9 +415,10 @@ private Object construct(Node node, String id, ConstructNode constructor) {
? e.getProblem().substring("Unsupported field: ".length()) : null;
String hint = "";
if ("bean".equals(field)) {
- hint = " (the bean language is written as method: {ref: myBean, method: process})";
+ hint = " (the bean language is written as expression: {method: {ref: myBean, method: process}})";
} else if ("expression".equals(field) || "language".equals(field)) {
- hint = " (an expression is written with the language as the key: simple: \"...\", constant: \"...\")";
+ hint = " (an expression is written as expression: with the language as the key: expression: {simple:"
+ + " {expression: \"...\"}}, expression: {constant: {expression: \"...\"}})";
Review Comment:
💡 **Nit:** "written as expression: with the language as the key" is hard to parse — "as expression:" looks like it ends the thought, then "with" restarts it. Rewording to make the structure clearer:
```suggestion
hint = " (an expression is written with the expression: wrapper and the language as the key: expression: {simple:"
+ " {expression: \"...\"}}, expression: {constant: {expression: \"...\"}})";
```
--
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-24722: camel-yaml-dsl - the validator and deserializer hints recommend the canonical YAML format, not the deprecated shorthand [camel]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #26401:
URL: https://github.com/apache/camel/pull/26401#issuecomment-5662626515
<!-- ci-tested-modules -->
:test_tube: **CI tested the following changed modules:**
- `dsl/camel-jbang/camel-jbang-core`
- `dsl/camel-yaml-dsl/camel-yaml-dsl-common`
- `dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers`
- `dsl/camel-yaml-dsl/camel-yaml-dsl-maven-plugin`
- `dsl/camel-yaml-dsl/camel-yaml-dsl-validator`
- `dsl/camel-yaml-dsl/camel-yaml-dsl`
---
<details><summary>:microscope: Scalpel shadow comparison — Scalpel: 13 tested, 9 compile-only — current: 9 all tested</summary>
[Maveniverse Scalpel](https://github.com/maveniverse/scalpel) detected **22 affected modules** (current approach: 9).
<details><summary>:warning: Modules only in Scalpel (13)</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-kamelet-main`
- `camel-launcher`
- `camel-yaml-dsl`
- `camel-yaml-dsl-deserializers`
- `camel-yaml-dsl-maven-plugin`
- `coverage`
</details>
**Skip-tests mode would test 13 modules** (6 direct + 7 downstream), **skip tests for 9** (generated code, meta-modules)
<details><summary>Modules Scalpel would test (13)</summary>
- `camel-jbang-core`
- `camel-jbang-mcp`
- `camel-jbang-plugin-mcp`
- `camel-jbang-plugin-route-parser`
- `camel-jbang-plugin-tui`
- `camel-jbang-plugin-validate`
- `camel-launcher-container`
- `camel-yaml-dsl`
- `camel-yaml-dsl-common`
- `camel-yaml-dsl-deserializers`
- `camel-yaml-dsl-maven-plugin`
- `camel-yaml-dsl-validator`
- `camel-yaml-dsl-validator-maven-plugin`
</details>
<details><summary>Modules with tests skipped (9)</summary>
- `camel-jbang-it`
- `camel-jbang-main`
- `camel-jbang-plugin-edit`
- `camel-jbang-plugin-generate`
- `camel-jbang-plugin-kubernetes`
- `camel-jbang-plugin-test`
- `camel-kamelet-main`
- `camel-launcher`
- `coverage`
</details>
> :information_source: Shadow mode — Scalpel observes but does not affect test execution. [Learn more](https://github.com/maveniverse/scalpel)
</details>
:warning: **Some tests are disabled on GitHub Actions** (`@DisabledIfSystemProperty(named = "ci.env.name")`) and require manual verification:
- `dsl/camel-jbang/camel-jbang-core`: 1 test(s) disabled on GitHub Actions
:bulb: **Manual integration tests recommended:**
> You modified `dsl/camel-jbang/camel-jbang-core`. The related integration tests in `dsl/camel-jbang/camel-jbang-it` are excluded from CI. Consider running them manually:
> ```
> mvn verify -f dsl/camel-jbang/camel-jbang-it -Djbang-it-test
> ```
<details><summary>All tested modules (22 modules, 4m 57s total)</summary>
**Total reactor time:** 4m 57s
| Module | Duration | Status |
| --- | --- | --- |
| Camel :: YAML DSL | 54.4s | SUCCESS |
| Camel :: Launcher | 51.8s | SUCCESS |
| Camel :: JBang :: Plugin :: TUI | 51.7s | SUCCESS |
| Camel :: JBang :: MCP | 41.8s | SUCCESS |
| Camel :: JBang :: Plugin :: Kubernetes | 24.1s | SUCCESS |
| Camel :: JBang :: Plugin :: Testing | 11.0s | SUCCESS |
| Camel :: Kamelet Main | 10.3s | SUCCESS |
| Camel :: YAML DSL :: Common | 10.1s | SUCCESS |
| Camel :: YAML DSL :: Maven Plugins | 8.2s | SUCCESS |
| Camel :: YAML DSL :: Validator | 7.3s | SUCCESS |
| Camel :: Coverage | 5.2s | SUCCESS |
| Camel :: YAML DSL :: Deserializers | 5.2s | SUCCESS |
| Camel :: YAML DSL :: Validator Maven Plugin | 3.8s | SUCCESS |
| Camel :: JBang :: Plugin :: Validate | 2.9s | SUCCESS |
| Camel :: JBang :: Plugin :: Generate | 2.6s | SUCCESS |
| Camel :: JBang :: Plugin :: Edit | 1.5s | SUCCESS |
| Camel :: JBang :: Plugin :: MCP | 1.4s | SUCCESS |
| Camel :: JBang :: Plugin :: Route Parser | 1.2s | SUCCESS |
| Camel :: JBang :: Main | 1.0s | SUCCESS |
| Camel :: JBang :: Integration tests | 1.0s | SUCCESS |
| Camel :: Launcher :: Container | 0.8s | SUCCESS |
| Camel :: JBang :: Core | n/a | |
**Top 20 slowest modules:**
- `Camel :: YAML DSL` (54.4s)
- `Camel :: Launcher` (51.8s)
- `Camel :: JBang :: Plugin :: TUI` (51.7s)
- `Camel :: JBang :: MCP` (41.8s)
- `Camel :: JBang :: Plugin :: Kubernetes` (24.1s)
- `Camel :: JBang :: Plugin :: Testing` (11.0s)
- `Camel :: Kamelet Main` (10.3s)
- `Camel :: YAML DSL :: Common` (10.1s)
- `Camel :: YAML DSL :: Maven Plugins` (8.2s)
- `Camel :: YAML DSL :: Validator` (7.3s)
- `Camel :: Coverage` (5.2s)
- `Camel :: YAML DSL :: Deserializers` (5.2s)
- `Camel :: YAML DSL :: Validator Maven Plugin` (3.8s)
- `Camel :: JBang :: Plugin :: Validate` (2.9s)
- `Camel :: JBang :: Plugin :: Generate` (2.6s)
- `Camel :: JBang :: Plugin :: Edit` (1.5s)
- `Camel :: JBang :: Plugin :: MCP` (1.4s)
- `Camel :: JBang :: Plugin :: Route Parser` (1.2s)
- `Camel :: JBang :: Main` (1.0s)
- `Camel :: JBang :: Integration tests` (1.0s)
</details>
---
:gear: [View full build and test results](https://github.com/apache/camel/actions/runs/34830728160)
--
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