-
Notifications
You must be signed in to change notification settings - Fork 340
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
Matching errors for sub-resource methods with equivalent URI templatesregexs but different template variables #273
Comments
@glassfishrobot Commented |
@glassfishrobot Commented |
@glassfishrobot Commented First, the HTTP methods need to be grouped as per the regular expression of the |
@glassfishrobot Commented Use the same template variables for URI templates of sub-resource methods with |
@glassfishrobot Commented |
@glassfishrobot Commented |
@glassfishrobot Commented |
|
Given the following resource class:
@uritemplate("/")
static public class SubResourceMethodsWithDifferentTemplates {
@uritemplate("
{foo}
")
@HttpMethod
public String getFoo(@UriParam("foo") String foo)
{ return foo; }
@uritemplate("
{bar}")
@HttpMethod
public String postBar(@UriParam("bar") String bar) { return bar; }
}
The Java method postBar will not function correctly to a POST request that
matches the URI template "{bar}
".
See the unit test [1]:
SubResourceHttpMethodsTest.testSubResourceMethodsWithDifferentTemplates
and the email thread [2] on the users list.
[1]
https://jersey.dev.java.net/source/browse/checkout/jersey/trunk/jersey/test/com/sun/ws/rest/impl/subresources/SubResourceHttpMethodsTest.java?rev=170
[2] https://jersey.dev.java.net/servlets/BrowseList?list=users&by=thread&from=895080
Environment
Operating System: All
Platform: All
The text was updated successfully, but these errors were encountered: