Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not parsing @ApiOperation consumes/produces #1546

Closed
veitmichael opened this issue Nov 17, 2015 · 2 comments
Closed

Not parsing @ApiOperation consumes/produces #1546

veitmichael opened this issue Nov 17, 2015 · 2 comments
Milestone

Comments

@veitmichael
Copy link

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:

             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?

@fehguy
Copy link
Contributor

fehguy commented Nov 28, 2015

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.

@fehguy fehguy added this to the v1.5.5 milestone Nov 28, 2015
@veitmichael
Copy link
Author

Unfortunately I don't have the right to add any tag to the issue. :(

@fehguy fehguy modified the milestones: v1.5.5, v1.5.6 Dec 23, 2015
@fehguy fehguy modified the milestones: v1.5.6, v1.5.7 Jan 6, 2016
@fehguy fehguy modified the milestones: v1.5.7, v1.5.8 Feb 5, 2016
frantuma added a commit that referenced this issue Mar 5, 2016
Fix #1546 - consumes and produces reading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants