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
Support @RequestParam of type Map<String, String> #1061
Comments
Thanks for the detailed issue 🤘 It will likely not be soon that this is fixed, but ill definitely take a look |
Glad to help! I can take a look at the code and see what's going on. Do you have a pointer to the code where the problem might be? that would be helpful. |
@matias2681 I'm unable to see the endpoint in your project. Are you sure you've committed and pushed all the changes to your project? |
@dilipkrish I added a readme file to the project. I cloned and I could reproduce the issue. All the endpoints are inside the |
ah! I was using the gradle file instead of the maven pom. I narrowed it down to the endpoint exposing a patter we don't support yet... specifically
|
Are there any documentation available to see how to test (@RequestParam Map<String, String> params) params from swagger ui HTML page? |
It is an any type... so you can basically send any arbitrary json with key value pair of string type and it will work. For e.g. {
"a" : "hello",
"b" : "world"
....
} |
Thank you @dilipkrish. |
Yes you can send anything, but the Swagger "try it out" feature doesn't allow me to edit the parameter names as I need to do. Perhaps keeping this as an open feature request is an option? How about defining new annotations to let me pass some clues over to swagger for a map (flexible) parameter situation? What about changing the swagger UI so that I can edit the query parameter names? |
@chrisinmtown Strictly per spec, |
It still does not support this feature ? |
@kapishmalik what is not supported, please report a different issue with additional details, this is an issue pertaining to v2.4.0. |
Hi,
I have a project that is using Spring Cloud and the class EnvironmentManagerMvcEndpoint.java seems to be generating a wrong swagger file. The method value (POST) with a parameter that is a Map is mapped as this:
The type:ref makes the file invalid, I tried changing to "string" instead of "ref" and it results in a valid swagger file.
I also run the debugger that you have available in http://online.swagger.io/validator/debug and I had this error message.
I created this project where you can see the problem.
I would like to know if there is a workaround to make this works.
Thanks
The text was updated successfully, but these errors were encountered: