davsclaus opened a new pull request, #82:
URL: https://github.com/apache/camel-jbang-examples/pull/82

   Rung 5 of the ladder from CAMEL-24808: connecting without any external 
service.
   
   Three examples under `connect/`:
   
   - `stock-api`: the shop's stock REST service. `GET /stock` returns the stock 
file, `GET /stock/{sku}` picks one SKU with a `jsonpath` filter and returns it 
as JSON, or 404 with an error body. Served by the HTTP server built into the 
Camel CLI.
   - `http-client`: every line of the three web shop orders is checked against 
the stock service over HTTP, with the service running in the same example. 
Teaches `toD`, keeping state in exchange properties rather than headers (a 
`sku` header would collide with the `{sku}` path parameter on the server), 
dropping the body before a GET, and `throwExceptionOnFailure=false` to handle a 
404 in the route.
   - `file-processing`: a courier route copies five sample files into `inbox/`; 
the invoices route picks up `.json` files only, validates the amount, archives 
under `archive/<year-month>/` and moves to `done`, a negative invoice fails 
validation and is moved to `failed` with a one-line warning, and the driver's 
note is left alone.
   
   Each has a README in the ladder shape, `metadata.json` with `teaches`, a 
Citrus YAML test run with `camel test run` (HTTP send/receive with JSON path 
validation for stock-api, log verification for the others), and a CI matrix 
entry. All three tests pass locally. `inbox/` and `archive/` are gitignored. 
Catalog regenerated (39 examples).
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   
   https://claude.ai/code/session_01Bp3538HRBPMQkb5ta9xRaj


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