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
RESTEasy reactive illegally restricts JAX-RSpath parameter names #25258
Comments
/cc @FroMage, @geoand, @stuartwdouglas |
@geoand if you don't support regexp in paths, my guess is that you should use |
The name of a group can only contain following characters: Additionally, it may only start with: (See java.util.Pattern.groupName) Lets compare this with the restrictions outlined in the javax.ws.rs.Path#value javadoc.
The full ABNF, just for reference:
The capturing group name is created in: Lines 157 to 158 in 77aa7d3
These lines create a simple regex pattern, not respecting that uri templates are more complex than group names allow for. A solution would introduce some kind of normalization when creating the capture group, for example (not a fully tested solution, just as inspiration for now): |
@Postremus mind opening a draft PR with that change? |
Describe the bug
Consider the following JAX-RS resource:
Note that path parameter something-with-dash. According to the Javadoc of @path the dash is an allowed character in a parameter name. However, if you try to run this with resteasy-reactive startup fails with
It seems he reactive extension does not comply with the JAX-RS specification.
The same class works fine with the non-reactive version of RESTEasy.
Patterns in Java indeed do not allow dashes in capture group names.
Expected behavior
Code that is legal according to the JAX-RS specification should work in Quarkus.
Actual behavior
Quarkus startup fails with the error above.
How to Reproduce?
Try to run the provided JAX-RS resource class with quarkus-resteasy-reactive.
Output of
uname -a
orver
No response
Output of
java -version
17
GraalVM version (if different from Java)
No response
Quarkus version or git rev
2.8.2.Final
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
No response
The text was updated successfully, but these errors were encountered: