You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Same issue applies to the produces (and also consumes?) property of the @ApiOperation annotation:
I am using a comma-separated list of mime-types, and it gets displayed as comma-separated list in Swagger-UI.
Fix looks like just changing
modules/swagger-jaxrs/src/main/java/io/swagger/jaxrs/Reader.java to split the string for api.produces() and api.consumes(), similar to resolution of issue #1448:
if (!api.produces().isEmpty()) {
produces = new String[]{api.produces()};
}
Btw., I am just trying to use this property as I am not able to control the sort order of mime types. From @produces JAX-RS annotation, sort order is not preserved (most probably lost already in JAX-RS implementation...). Is there any other mechanism to define the sort order, or at least the default value of the "Response Content Type", as I don't like duplicating information?
The text was updated successfully, but these errors were encountered:
Yes, we can simply change the parsing of the consumes and produces property to split on commas. Please consider adding a PR to get this done more quickly.
Referring to issue #1448:
Same issue applies to the produces (and also consumes?) property of the @ApiOperation annotation:
I am using a comma-separated list of mime-types, and it gets displayed as comma-separated list in Swagger-UI.
Fix looks like just changing
modules/swagger-jaxrs/src/main/java/io/swagger/jaxrs/Reader.java to split the string for api.produces() and api.consumes(), similar to resolution of issue #1448:
Btw., I am just trying to use this property as I am not able to control the sort order of mime types. From @produces JAX-RS annotation, sort order is not preserved (most probably lost already in JAX-RS implementation...). Is there any other mechanism to define the sort order, or at least the default value of the "Response Content Type", as I don't like duplicating information?
The text was updated successfully, but these errors were encountered: