contracts/rest-code-first: drop the Content-Type workaround on the test's GETs once Camel ships Citrus 5.1

Open Beginner friendly
#129 2 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
73/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
java, yaml
Domain
testing

Research direction

Read parent/pom.xml and check the citrus-version used by the release CI configured in .github/workflows/build.yml; wait until it is 5.1.0 or later. Then edit test/rest-code-first.citrus.it.yaml, removing the workaround comment and contentType from both GETs while keeping it on the POSTs. Run the Citrus test and confirm the GET responses are 200 and 404.

Written by the indexing model from the issue text.

Description

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:

        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

Dominant language
HTML
Stars
15
Forks
15
Avg merge
10h 47m
Merged PRs (30d)
27

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Similar issues

More Testing & QA issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.