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

   This removes the `split` option ("Split by Feature") of 
`ogcapi-features-action`.
   
   ### Why
   
   With `split: true`, the template split the feature collection with the 
JSONPath `$.features[*]` and sent each feature to `kamelet:sink`. That only 
gives the next step one message per feature when the Kamelet is called with the 
`kamelet` EIP. Called with `to`, as in a Pipe, `kamelet:sink` has no consumer, 
so the next step still got the whole collection. The description said so, but 
an option that does nothing in the most common use is a trap. This was finding 
9 of the Citrus test work, and Claus chose to remove the option.
   
   ### Changes
   
   - **Option:** `split` is removed, along with the `choice` in the template. 
The Kamelet now always sends the collection on, as it already did for every 
`to` and Pipe use.
   - **Dependency:** `camel:jsonpath` is removed, since only the split used it. 
The SBOM is regenerated.
   - **Good to know:** the paragraph now says: "to handle each feature as a 
message of its own, add a `split` step after the Kamelet with the JSONPath 
`$.features[*]`."
   - **New test:** `geo/ogcapi-features-action-split-route` (CommonIT#geo) does 
exactly that. The server sends a collection of two features, and each one 
arrives as a message of its own after `split` + `marshal: json`.
   
   ### Tested
   
   On a local build of Camel `main`:
   - `./mvnw -o clean install -DskipTests`, twice: BUILD SUCCESS. The library 
copy matches.
   - `library/camel-kamelets-catalog` tests pass.
   - `CommonIT#geo`: 4/4 pass.
   
   ### Upgrade note (for #3190)
   
   `ogcapi-features-action`: the `split` option is removed. To process each 
feature as a message of its own, add a `split` EIP with the JSONPath 
`$.features[*]` on the body after the Kamelet, and `marshal: json` if you need 
each feature as JSON text. The option only worked inside a Kamelet EIP. With 
`to`, or in a Pipe, the next step always got the whole collection.
   
   _Claude Code on behalf of Claus Ibsen_
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   
   https://claude.ai/code/session_016Y4dDmBDsSWV117kccuNf9
   


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