[ https://issues.apache.org/jira/browse/CAMEL-13340?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dmitry Volodin updated CAMEL-13340: ----------------------------------- Fix Version/s: 2.22.4 2.23.2 > Invalid swagger json/yaml generated for Rest DSL > ------------------------------------------------ > > Key: CAMEL-13340 > URL: https://issues.apache.org/jira/browse/CAMEL-13340 > Project: Camel > Issue Type: Bug > Components: camel-swagger > Affects Versions: 2.22.0 > Reporter: Sergey Savenko > Priority: Major > Fix For: 3.0.0, 2.23.2, 2.24.0, 2.22.4 > > > Swagger rests description is generated with invalid responseSchema element. > You can see example I found on > [stackoverflow|https://stackoverflow.com/questions/52745160/camel-rest-dsl-swagger-output-contains-invalid-responseschema-element]. > From camel 2.2 swagger-core was upgraded from 1.5.17 to 1.5.20. > In Swagger 1.5.19 new ResponseSchemaMixin was added to default object mapper > [https://github.com/swagger-api/swagger-core/commit/8b97df3667559fca1783da845607afc30e550b83#diff-58c27954db290a19d4fadbfe34b0bbf3] > Camel creates ObjectMapper manually, and does not add this mixin, which > results in incorrect json/yaml generated. See > [https://github.com/apache/camel/blob/camel-2.22.0/components/camel-swagger-java/src/main/java/org/apache/camel/swagger/RestSwaggerSupport.java#L216] > and line 235 > Fix can be either add ResponseSchemaMixin to manually created objectmappers > OR call Json.mapper() and Yaml.mapper() to use swagger logic and don't create > mapper manually. -- This message was sent by Atlassian JIRA (v7.6.3#76005)