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

   ## Description
   
   [CAMEL-25928](https://issues.apache.org/jira/browse/CAMEL-25928), part 3 of 
the plan: the YAML validator reads the body types of the EIPs from the catalog. 
Stacked on #28437; only the last commit belongs to this PR.
   
   The body flow of the validator (`TextBodyFlow`, `BodyTypeFlow`) had three 
lists of EIPs of its own: `KEEPING_STEPS`, `SAME_BODY_BLOCKS` and 
`SETS_THE_BODY`. They are replaced by the `eipOut` and `eipSteps` body types of 
the EIPs in the catalog (#28424), resolved for the options the step sets with 
the shared rule of #28437. For a catalog of an older Camel version without 
them, the validator falls back to its own catalog, as it already does for 
components.
   
   | | Before: a list in the validator | Now: from the catalog |
   |---|---|---|
   | keeps the body | 19 steps | `eipOut` is `unchanged`. This adds `threads`, 
`rollback`, `throwException`, `aggregate`, `pausable`, `resumable`, and a 
`split` without an `aggregationStrategy` |
   | its steps start with the body at the EIP | `choice`, `when`, `otherwise`, 
`filter`, `doTry`, `doCatch`, `doFinally` | `eipSteps` is `unchanged`. This 
adds `loop`, `multicast`, `pipeline`, `circuitBreaker`, `saga`, `transacted`, 
`step` and others. `doCatch` and `doFinally` are dropped: their body is the one 
of the step that failed |
   | may set the body | 20 steps | everything except an EIP that keeps the body 
or leaves the body of its steps. An EIP the catalog does not describe counts as 
setting it, and so does one whose body depends on an option. `kamelet` now 
counts; `convertVariableTo`, which converts a variable, no longer does |
   
   An EIP is a catalog model with input. Languages and data formats have models 
too, but they are not steps.
   
   ### Tests
   
   - New tests in `TextBodyFlowTest` and `BodyTypeFlowTest`. All 5 fail on the 
old code and pass on the new:
     - `threads` keeps the body;
     - a `to: file` inside a `loop` gets the parsed data;
     - a `doCatch` does not see the body from before the `doTry`;
     - a `split` keeps the body unless it aggregates;
     - a `kamelet` may set the body, while a `log` does not.
   - Validator: all 301 tests pass, including the tests that validate every 
YAML example in the docs.
   - camel-jbang-core validation tests: 197 pass. TUI source checks: 21 pass.
   
   ### Docs
   
   The YAML validator section of `body-types.adoc` says that the EIPs come from 
the catalog.
   
   _Claude Code on behalf of davsclaus_
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


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