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

   # Description
   
   Adds native semantic question declarations to Java and XML DSLs, matching 
the existing YAML declaration contract. Java routes can use 
`semanticQuestions().question(name)`; XML documents can place 
`<semantic><question .../></semantic>` before their routes. Boolean, choice and 
score questions share the existing context-wide registry, validation, adapters, 
decision policies and `ref:` / `refs:` evaluation.
   
   Declarations are registered before route initialization without performing 
inference. Resource reload replaces the source's questions and removes obsolete 
declarations, including those from deleted files. Java/XML applications require 
`camel-semantic`, without a runtime dependency on `camel-yaml-dsl` or a 
particular provider.
   
   The change includes model metadata, XML parsers and schemas, Java/YAML model 
writers, XML-to-YAML conversion support, documentation and generated catalog 
artifacts. The XML schemas and writers put declarations before routes.
   
   XML route documents are now fully parsed during preparse so questions in 
resources loaded together exist before route references initialize. If preparse 
fails, the loader clears the pending batch's caches: otherwise earlier 
resources retain stale input because their builders never reach configuration. 
Regression tests cover retrying after corrected resources.
   
   Known limitations are documented: direct model exports and XML-to-YAML 
conversion preserve declarations, but runtime dumps such as 
`camel.main.dumpRoutes=yaml` still contain only routes and need declarations 
supplied separately when reloaded. When adding Java builders to a running 
context, the builder declaring shared questions must be added before builders 
that reference them.
   
   Validation of the final changes:
   
   - 928 tests passed, 2 skipped across the semantic, XML loader, XML IO, Java 
IO, YAML IO and YAML semantic declaration suites.
   - Full repository `mvnd -B -ntp -Dmaven.build.cache.enabled=false clean 
install -DskipTests`: all 695 modules passed.
   - Formatter validation and import-order checks passed for all seven affected 
Java modules.
   - Both generated XML IO and Spring schemas accept declarations before routes 
in `<routes>` and `<camel>` documents; the catalog documentation mirror is 
byte-identical.
   
   # Target
   
   - [x] I checked that the commit is targeting the correct branch (`main`).
   
   # Tracking
   
   - [x] A JIRA issue is filed: 
[CAMEL-25138](https://issues.apache.org/jira/browse/CAMEL-25138).
   
   # Apache Camel coding standards and style
   
   - [x] Each commit has a meaningful subject line and body.
   - [x] The full clean install with tests skipped passed locally, and all 
related generated changes are committed.
   
   # AI-assisted contributions
   
   - [x] AI-assisted commits include `Co-authored-by` attribution; both commits 
are cryptographically signed and include `Signed-off-by`.
   
   Generated by Codex via /oss-fix-issue on behalf of 
[luigidemasi](https://github.com/luigidemasi).
   


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

Reply via email to