Henrik Karlsson created CAMEL-17159:
---------------------------------------

             Summary: clientRequestValidation fails then operation produces 
more than just xml and/or json
                 Key: CAMEL-17159
                 URL: https://issues.apache.org/jira/browse/CAMEL-17159
             Project: Camel
          Issue Type: Bug
          Components: camel-core
    Affects Versions: 3.11.3, 3.11.0, 3.11.2, 3.11.1
            Reporter: Henrik Karlsson
         Attachments: image-2021-11-02-19-36-21-437.png

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.
!image-2021-11-02-19-36-21-437.png!



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to