Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-17159

rest-dsl - clientRequestValidation fails then operation produces more than just xml and/or json

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 3.11.3
    • 3.13.0, 3.11.4
    • camel-core
    • None
    • Unknown

    Description

      We an openapi api with an operation that produces both application/json and application/csv. When setting clientRequestValidation=true requests with Accept=application/csv fails with status 406.

      This happens because the method isValidOrAcceptedContentType in RestBindingAdvice only accepts a content type containing 'json' if parameter valid contains 'json' even if other content types are included.

      Attachments

        1. image-2021-11-02-19-36-21-437.png
          1011 kB
          Henrik Karlsson
        2. image.png
          1011 kB
          Henrik Karlsson
        3. image.png
          1011 kB
          Henrik Karlsson

        Issue Links

          Activity

            People

              Unassigned Unassigned
              henka-rl Henrik Karlsson
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: