davsclaus opened a new issue, #129:
URL: https://github.com/apache/camel-jbang-examples/issues/129

   The Citrus test of `contracts/rest-code-first` (#118) works around a Citrus 
HTTP client default. The client sends `Content-Type: text/plain` on a request 
with no body, and the example's `bindingMode: json` then skips writing the 
answer of a GET, which is answered 500. So the two GETs in 
`test/rest-code-first.citrus.it.yaml` set the header themselves:
   
   ```yaml
           GET:
             path: "/orders/ORD-1002"
             # the client's default Content-Type text/plain makes the json 
binding skip writing the answer
             contentType: "application/json"
   ```
   
   (the same for `GET /orders/ORD-9999`).
   
   Citrus fixed this in **5.1.0** (released 2026-10-19): 
citrusframework/citrus#1826, "omit default Content-Type on bodyless HTTP 
requests" (citrusframework/citrus#1829). Camel's test plugin still uses Citrus 
5.0.2, both in Camel 4.23.0 and on `main` (`citrus-version` in 
`parent/pom.xml`).
   
   Once the Camel release CI tests with (`CAMEL_VERSION` in 
`.github/workflows/build.yml`) ships Citrus 5.1.0 or later:
   
   - remove `contentType: "application/json"` and its comment from the two GETs 
(keep it on the POSTs, which send a JSON body);
   - check that the test still passes, so the GETs are answered 200 and 404 
without the header.
   
   _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