[
https://issues.apache.org/jira/browse/CXF-3454?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13019117#comment-13019117
]
Guillermo Castro commented on CXF-3454:
---------------------------------------
Specify one path with several options? Let's say you have a service call that
returns a list of objects:
GET /service/objects/
If the list is too big, you might want to add paging, though. It would be
really easy if I could use the optional parameters for getting a max number of
objects and offset for paging:
GET /service/objects/max/100 (Only get the first 100 objects)
GET /service/objects/max/100/offset/100 (Get the next 100 object)
I could create one method for each call, but if I was able to use optional
parameters I can just use one method and then process the options inside of the
method.
> CXFRS doesn't work when there are multiple optional parameters in a @Path
> annotation
> ------------------------------------------------------------------------------------
>
> Key: CXF-3454
> URL: https://issues.apache.org/jira/browse/CXF-3454
> Project: CXF
> Issue Type: Bug
> Components: JAX-RS
> Affects Versions: 2.4
> Reporter: Guillermo Castro
> Labels: jaxrs
> Attachments: URITemplateTest.java
>
>
> In JAX-RS you can define custom patterns for path variables, which allows you
> to define optional parameters that can be present or not. Currently, CXF only
> works if you only have 1 optional parameter in the @Path (see test
> "URITemplateTest.testExpressionWithNestedGroupAndTwoVars2()", but fails for
> paths with 2 or more optional parameters.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira