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

Prefer parameter order from @Parameters annotation #1274

Merged
merged 2 commits into from
Oct 3, 2022

Conversation

MikeEdgar
Copy link
Member

Closes #1165

Signed-off-by: Michael Edgar michael@xlate.io

@MikeEdgar MikeEdgar added this to the 3.1.0 milestone Sep 29, 2022
Comment on lines -57 to -59
{
"$ref": "#/components/parameters/pathParam2"
},
Copy link
Member Author

Choose a reason for hiding this comment

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

This should have been hidden all along (line 32)

@GET
@Path(value = "/two")
@Parameter(name = "pathParam1", style = ParameterStyle.SIMPLE)
@Parameter(ref = "pathParam2")
@Parameter(ref = "queryParam1", name = "queryParamOne")
@Parameter(in = ParameterIn.COOKIE, description = "Ignored: missing key attributes")
@Parameter(in = ParameterIn.DEFAULT, description = "Ignored: missing key attributes")
@Parameter(in = ParameterIn.HEADER, description = "Ignored: missing key attributes")
@Parameter(in = ParameterIn.PATH, description = "Ignored: missing key attributes")
String exampleEndpoint2(@PathParam(value = "pathParam1") String pathParam1,
@Parameter(hidden = true) @PathParam(value = "pathParam2") String pathParam2) {
return null;
}

Closes smallrye#1165

Signed-off-by: Michael Edgar <michael@xlate.io>
Signed-off-by: Michael Edgar <michael@xlate.io>
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@MikeEdgar MikeEdgar added the backport/2.x Issue pending backport to the 2.x series label Oct 1, 2022
@MikeEdgar
Copy link
Member Author

@phillip-kruger , please take a look when you get a moment.

Copy link
Member

@phillip-kruger phillip-kruger left a comment

Choose a reason for hiding this comment

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

LGTM

@MikeEdgar MikeEdgar merged commit 47cef91 into smallrye:main Oct 3, 2022
@MikeEdgar MikeEdgar deleted the issue-1165 branch October 3, 2022 23:35
@MikeEdgar MikeEdgar removed the backport/2.x Issue pending backport to the 2.x series label Oct 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Order of parameters not respected
2 participants