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/19 12:35:34 UTC

[PR] CAMEL-25820: camel-yaml-dsl-validator - the Kamelet schema keeps the schema of the template under definitions, so validating a Kamelet logs no warning [camel]

davsclaus opened a new pull request, #28115:
URL: https://github.com/apache/camel/pull/28115

   [CAMEL-25820](https://issues.apache.org/jira/browse/CAMEL-25820), the part in camel-yaml-dsl-validator. #28113 is the camel-jbang part.
   
   Each JVM that validated a Kamelet logged this warning once, such as each `camel` command and each MCP server:
   
   ```
   WARN com.networknt.schema.keyword.UnknownKeywordFactory : Unknown keyword templateEntry - you should define your own Meta Schema. If the keyword is irrelevant for validation, just use a NonValidationKeyword or if it should generate annotations AnnotationKeyword
   ```
   
   `YamlValidator` builds the schema of a Kamelet from the route schema (CAMEL-25194). It kept the schema of the template under a key of its own at the root (`templateEntry`), which is not a JSON schema keyword. The validator (networknt 3.0.4) warns about an unknown keyword once per JVM.
   
   ## What
   
   - The schema of the template is kept under `definitions`, and `spec.template` refers to `#/definitions/templateEntry`.
   - `definitions` is where draft 4 keeps a schema that is only referenced. The route schema is draft 4, so `$defs` (draft 2019-09) would be an unknown keyword too.
   - The validation is the same.
   
   ## Tests
   
   - `KameletValidationTest` (1 more): validating a Kamelet logs no warning about an unknown keyword. The validator warns once per JVM, so a test that loaded the schema before would hide the warning. The test therefore also checks that the schema has only keywords at its root.
     - Without the fix, it fails with the warning above.
   - All tests of camel-yaml-dsl-validator pass (263), and the Kamelet tests of camel-jbang-core (58), whose test log no longer has the warning.
   
   🤖 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-25820: camel-yaml-dsl-validator - the Kamelet schema keeps the schema of the template under definitions, so validating a Kamelet logs no warning [camel]

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

   :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-25820: camel-yaml-dsl-validator - the Kamelet schema keeps the schema of the template under definitions, so validating a Kamelet logs no warning [camel]

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


-- 
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-25820: camel-yaml-dsl-validator - the Kamelet schema keeps the schema of the template under definitions, so validating a Kamelet logs no warning [camel]

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

   <!-- 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` | `LaunchManagerOutcomeTest.startedWhenTheStatusFileSaysSo` | 1 | expected: null but was: LaunchOutcome[ok=false, log=null] |
   
   > :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: 7 of 707 tested, 9 compile-only — current: 7 all tested</summary>
   
   [Maveniverse Scalpel](https://github.com/maveniverse/scalpel) detected **7 affected modules** (current approach: 7).
   
   **Skip-tests mode would test 7 modules** (1 direct + 6 downstream), **skip tests for 9** (generated code, meta-modules)
   
   <details><summary>Modules Scalpel would test (7)</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-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/YamlValidator.java, dsl/camel-yaml-dsl/camel-yaml-dsl-validator/src/test/java/org/apache/camel/dsl/yaml/validator/KameletValidationTest.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 (16 modules, 3m 8s total)</summary>
   
   **Total reactor time:** 3m 8s
   
   | Module | Duration | Status |
   | --- | --- | --- |
   | Camel :: Launcher | 51.6s | SUCCESS |
   | Camel :: JBang :: MCP | 42.0s | SUCCESS |
   | Camel :: JBang :: Plugin :: Validate | 29.5s | SUCCESS |
   | Camel :: YAML DSL :: Validator | 22.7s | SUCCESS |
   | Camel :: JBang :: Plugin :: Kubernetes | 13.8s | SUCCESS |
   | Camel :: JBang :: Plugin :: Testing | 12.7s | SUCCESS |
   | Camel :: Coverage | 5.2s | SUCCESS |
   | Camel :: YAML DSL :: Validator Maven Plugin | 3.3s | SUCCESS |
   | Camel :: JBang :: Plugin :: Generate | 2.0s | SUCCESS |
   | Camel :: JBang :: Plugin :: MCP | 1.5s | SUCCESS |
   | Camel :: JBang :: Plugin :: Edit | 1.4s | SUCCESS |
   | Camel :: JBang :: Integration tests | 1.0s | SUCCESS |
   | Camel :: JBang :: Main | 0.9s | SUCCESS |
   | Camel :: Launcher :: Container | 0.7s | SUCCESS |
   | Camel :: JBang :: Core | n/a |  |
   | Camel :: JBang :: Plugin :: TUI | n/a |  |
   
   **Top 20 slowest modules:**
   - `Camel :: Launcher` (51.6s)
   - `Camel :: JBang :: MCP` (42.0s)
   - `Camel :: JBang :: Plugin :: Validate` (29.5s)
   - `Camel :: YAML DSL :: Validator` (22.7s)
   - `Camel :: JBang :: Plugin :: Kubernetes` (13.8s)
   - `Camel :: JBang :: Plugin :: Testing` (12.7s)
   - `Camel :: Coverage` (5.2s)
   - `Camel :: YAML DSL :: Validator Maven Plugin` (3.3s)
   - `Camel :: JBang :: Plugin :: Generate` (2.0s)
   - `Camel :: JBang :: Plugin :: MCP` (1.5s)
   - `Camel :: JBang :: Plugin :: Edit` (1.4s)
   - `Camel :: JBang :: Integration tests` (1.0s)
   - `Camel :: JBang :: Main` (0.9s)
   - `Camel :: Launcher :: Container` (0.7s)
   
   </details>
   
   ---
   :gear: [View full build and test results](https://github.com/apache/camel/actions/runs/39253263008)


-- 
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