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

Introduce @Separator annotation for query parameters #29550

Merged
merged 1 commit into from
Dec 5, 2022

Conversation

geoand
Copy link
Contributor

@geoand geoand commented Nov 29, 2022

This annotation allows to actually turn a String into a List automatically for each query param value

Resolves: #29528

P.S. A follow up that we might want to have is to introduce validation on the annotation's use

This annotation allows to actually turn a String into a List<String>
automatically for each query param value

Resolves: quarkusio#29528
@geoand
Copy link
Contributor Author

geoand commented Dec 5, 2022

@Sgitario what do you think about this one?

Copy link
Contributor

@Sgitario Sgitario left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't say I'm a big fan of this feature, but if this is something that already exists in Resteasy Classic, go for it.
The implementation looks really good to me!

@geoand
Copy link
Contributor Author

geoand commented Dec 5, 2022

Thanks for checking

@geoand geoand merged commit 36c5fa5 into quarkusio:main Dec 5, 2022
@geoand geoand deleted the #29528 branch December 5, 2022 13:28
@quarkus-bot quarkus-bot bot added this to the 2.16 - main milestone Dec 5, 2022
@quarkus-bot quarkus-bot bot added the kind/enhancement New feature or request label Dec 5, 2022
@gsmet gsmet modified the milestones: 2.16 - main, 2.15.0.Final Dec 6, 2022
@luca-bassoricci
Copy link
Contributor

@geoand
I see @Separator is valid only for parameters, but what about @BeanParam as in below example class?

public class BeanUsedAsBeanParam
{
	@RestQuery @Separator(",")
	Set<Long> longList;
	@RestQuery @Separator(",")
	Set<String> stringList;
}

Is that not possible at all or should be a valid use case?

@geoand
Copy link
Contributor Author

geoand commented Dec 7, 2022

It is a valid use case. We'll need to take care of that as well

geoand added a commit to geoand/quarkus that referenced this pull request Dec 7, 2022
@geoand
Copy link
Contributor Author

geoand commented Dec 7, 2022

#29735 takes care of it

geoand added a commit that referenced this pull request Dec 7, 2022
essobedo pushed a commit to essobedo/quarkus that referenced this pull request Dec 12, 2022
gsmet pushed a commit to gsmet/quarkus that referenced this pull request Dec 20, 2022
Follows up on: quarkusio#29550

(cherry picked from commit 2b83f06)
@mhagnumdw
Copy link

Is the @Separator annotation in the Quarkus documentation?

@geoand
Copy link
Contributor Author

geoand commented Jun 12, 2024

It seems we forgot to add it, so I opened #41146 to include it.

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

Successfully merging this pull request may close these issues.

Resteasy Reactive support for multivalued parameters
5 participants