openapi-restdsl-generator and accordingly the camel-restdsl-openapi-plugin for maven generate problematic code/xml if there are multiple responses with the same content-type defined for a given path and operation.
will result in:
The problematic part is the comma-separated list as the value of the produces-attribute, where application/json is listed twice. The Camel route will then, per default, return "application/json,application/json" as the content-type.
This invalid content-type causes some problems in third-party tools and frameworks, for example the Citrus testing framework. Although a simple work-around for the example above is to explicitly set the content-type header in the Camel route, I think the current behavior could be easily improved by modifying org.apache.camel.generator.openapi.OperationVisitor to use a set instead of a list for emitting the operationLevelProduces.
This would not fix cases, where there are multiple responses with different content-types, such as "application/json,text/xml". But I assume that they are a little bit less common nowadays (at least for us).
I will follow-up with a pull-request.