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

   # Description
   
   YAML validation can select the wrong `oneOf`/`anyOf` branch for quoted 
numbers or property placeholders, and scalar cleanup can hide genuinely missing 
required fields. Select alternatives per YAML location and prefer branches 
whose only errors are scalar forms accepted by the runtime.
   
   This intentionally replaces the `removeSatisfiedAlternatives`/`constructOf` 
workaround introduced by 
[CAMEL-25238](https://issues.apache.org/jira/browse/CAMEL-25238) in 
`ffe3e40d72bd` (#27231). Its five original regression tests remain unchanged 
and pass. New tests cover quoted numbers, numeric placeholders, separate 
locations, mixed question types, invalid fields and missing required 
declarations.
   
   The stricter required-field handling exposes an existing REST metadata 
inconsistency: `ParamDefinition.type` defaults to `path`, but its XML 
annotation marks it required. Make that annotation optional and regenerate the 
XML/YAML schemas, completion metadata and existing catalog mirrors. Tests check 
both validation behavior and the published metadata. The validator does not 
patch schemas at load time.
   
   Split from #27373 following 
[review](https://github.com/apache/camel/pull/27373#pullrequestreview-5415057613),
 so this shared validator change can be reviewed independently of semantic 
experts. It also fixes quoted and placeholder `threshold` values in existing 
semantic declarations.
   
   Validation:
   
   - YAML DSL: 458 tests passed; YAML common/deserializers: 12 tests passed.
   - YAML validator: 214 tests passed, including all original CAMEL-25238 
regressions.
   - Validator Maven plugin: 10 tests passed.
   - Full root `mvnd -B -ntp -Dmaven.build.cache.enabled=false clean install 
-DskipTests`: 698 modules succeeded.
   - Formatting/import generation and `git diff --check` passed; generated 
changes are committed.
   
   # Target
   
   - [x] Targets `main` (Camel 4).
   
   # Tracking
   
   - [x] [CAMEL-25347](https://issues.apache.org/jira/browse/CAMEL-25347).
   
   # Apache Camel coding standards and style
   
   - [x] Commit explains the bug, resolution and replacement of prior work.
   - [x] Tests, generated artifacts and upgrade documentation are included.
   
   # AI-assisted contributions
   
   - [x] AI-assisted commit includes co-authorship attribution.
   
   _Generated by Codex on behalf of @luigidemasi via /oss-address-review._
   


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