Hi
I've updated the code to better handle requests like
//resource/12345 against /{tenant : [^/]*}/resource/{id}.
CXF UriTemplate is trying to move to the next group value if the current
value is empty/null - and there's a test where a regular expression
matching produces an empty value
That is my fallback plan and isn't that much extra work. Was just wanting
to see if JAX-RS had a way to help with it.
On Tue, Jun 23, 2015 at 6:22 PM, Craig McClanahan craig...@gmail.com
wrote:
I tend to prefer solutions to things like this that will be obviously
understood when I pass
Realistically in REST, path params are never optional. What you're trying
to do is bind the same service to two different URIs. This might be a
reason why you want to use sub resources to do the implementation.
Assuming you have some wrapper level around this, adding these two methods
should
I have a situation where I'd like a @PathParam to be optional. For example
I'd like for the path /{tenant}/resource/{id} to be matched for both
.../myTenant/resource/12345 and .../resource/12345, the second case passing
in null for the tenant @PathParam.
I did some research and it seemed like
I tend to prefer solutions to things like this that will be obviously
understood when I pass responsibility for the code on to someone else in
the future, especially if that person is (like me) not particularly fluent
at regexp syntax :-). How about just going for two resource methods with