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

MultivaluedMap can not be parsed in POST body of JAX-RS method #172

Closed
eyala opened this issue Apr 19, 2013 · 7 comments
Closed

MultivaluedMap can not be parsed in POST body of JAX-RS method #172

eyala opened this issue Apr 19, 2013 · 7 comments
Labels

Comments

@eyala
Copy link

eyala commented Apr 19, 2013

I'm opening this issue based on this question on StackOverflow - I can confirm that it still occurs:

Basically, Swagger doesn't seem to parse javax.ws.rs.core.MultivaluedMaps.

A method like this:

@post
@ApiOperation("fake operation")
@path("/add")
public Response addStudentGroup(@ApiParam("fake param") MultivaluedMap<String, String> formParams) {}

will generate the following resource response:

{
"path" : "/fake/add",
"description" : "fake description",
"operations" : [ {
  "httpMethod" : "POST",
  "summary" : "fake operation",
  "responseClass" : "void",
  "nickname" : "addStudentGroup",
  "responseTypeInternal" : "void",
  "parameters" : [ {
    "description" : "fake param",
    "paramType" : "body",
    "required" : false,
    "allowMultiple" : false
  } ]
} ]

}

Making "allowMultiple=true" within the @ApiParam doesn't help.

@fehguy
Copy link
Contributor

fehguy commented Aug 30, 2014

closing as not supported

@fehguy fehguy closed this as completed Aug 30, 2014
@jansohn
Copy link

jansohn commented Oct 26, 2016

Any chance this will be supported in the future?

@fehguy : Your answer on Stackoverflow suggested

...it may be fairly easy to implement.

@chrisinmtown
Copy link

I understand that Swagger cannot read my mind for the multi-value map. But I'd be glad to add arguments to the annotation, whatever helps. Is this simply a dead-end road? Those of us with flexible search interfaces still would like to document them ..

@webron
Copy link
Contributor

webron commented Feb 12, 2018

@chrisinmtown Swagger/OpenAPI 2.0 does not support that, however, OAS3 might be able to. Would suggest filing a new ticket for it.

@chrisinmtown
Copy link

Please forgive my ignorance, what's OAS 3.0 and where would I file that new ticket?

@webron
Copy link
Contributor

webron commented Mar 22, 2018

OAS3 is OpenAPI 3.0, the new version of the spec. And you would file the new ticket on this repo, with an explanation of what you'd like to achieve.

@chrisinmtown
Copy link

@webron I followed your suggestion and opened #2721

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants