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
Complex type support by @ModelAttribute #1350
Conversation
@MaksimOrlov Sorry just getting around to merging PRs. How would this work in something like swagger-ui? How would the client resolve the #ind values? |
Hi. I'm sorry for the delay with answer. At the swagger-ui or some other tools we will get something like: myObject[#ind].myObject2[#ind].c #ind - it's only my suggestion to mark array's indexes. I'm not sure, that swagger-us's function "Try it out!" will work for requests with parameters like that. My other suggestion was just to leave empty brackets (myObject[].myObject2[].c) with out any other markers. But that will help to try request with only one parameter in array. My opinion, there should be some other way to introduce complex parameters at the ui level, the way different from just simple input fields and submit button. |
And I'm opened for any other suggestions and solutions for that issue:) |
That way is to use the request body :) Not sure what the right answer is, how about instead of #ind, we replace it with 0. That way the parameters are atleast accurate for one variation. What do you think? |
I'm agree with you. That can partly solve the issue. I will make commit with this changes. |
Thanks for the PR! 🙇 Sorry it took so long to merge it in |
This code adds functionality to unwrap complex parameters, that were annotated with @ModelAttribute annotation.
Example:
Where:
Will be unwrapped to: