-
Notifications
You must be signed in to change notification settings - Fork 962
Support multi-value query parameters #6118
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
Conversation
core/src/main/java/com/linecorp/armeria/internal/server/annotation/AnnotatedValueResolver.java
Outdated
Show resolved
Hide resolved
@Param Map<String, List<?>>There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left small suggestions. Thanks!
core/src/main/java/com/linecorp/armeria/internal/server/annotation/AnnotatedValueResolver.java
Outdated
Show resolved
Hide resolved
core/src/main/java/com/linecorp/armeria/internal/server/annotation/AnnotatedValueResolver.java
Outdated
Show resolved
Hide resolved
|
Thanks for the suggestions, @minwoox! |
236cb7f to
d7daa0d
Compare
core/src/main/java/com/linecorp/armeria/internal/server/annotation/AnnotatedValueResolver.java
Outdated
Show resolved
Hide resolved
core/src/main/java/com/linecorp/armeria/internal/server/annotation/AnnotatedValueResolver.java
Outdated
Show resolved
Hide resolved
core/src/main/java/com/linecorp/armeria/internal/server/annotation/AnnotatedValueResolver.java
Show resolved
Hide resolved
|
Thanks for the suggestions, @jrhee17 ! |
95ad3d0 to
0dff99c
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6118 +/- ##
============================================
+ Coverage 74.46% 74.64% +0.17%
- Complexity 22234 22480 +246
============================================
Files 1963 1972 +9
Lines 82437 83018 +581
Branches 10764 10805 +41
============================================
+ Hits 61385 61967 +582
+ Misses 15918 15901 -17
- Partials 5134 5150 +16 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @kwondh5217!
Signed-off-by: Daeho Kwon <trewq231@naver.com>
Motivation:
This PR is a follow-up to #6072, which added support for mapping all query parameters into a Map<String, String>. However, it does not handle cases where multiple values exist for the same query parameter key.
For example:
The current implementation only retains the last value
a=2, losinga=1.To better support multi-value query parameters, we introduce support for Map<String, List<?>>.
Modifications:
Result: