jsr339-experts@jax-rs-spec.java.net

[jsr339-experts] Re: [jax-rs-spec users] Boolean matrix parameters

From: Sergey Beryozkin <sberyozkin_at_talend.com>
Date: Fri, 13 Dec 2013 12:24:07 +0000

Sure,
https://java.net/jira/browse/JAX_RS_SPEC-437

Sergey
On 13/12/13 11:01, Marek Potociar wrote:
> I think it would be a good idea to support this, but IMO it is a grey area now. Would you mind entering a new improvement request in JAX-RS Jira to cover this clearly in the spec?
>
> At the moment I would say that individual implementations CAN support it, but should clearly state the feature is not portable. Ideally it should be required to explicitly enable this feature by a flag or a special Feature class etc.
>
> Marek
>
> On 25 Nov 2013, at 17:07, Sergey Beryozkin <sberyozkin_at_talend.com> wrote:
>
>> Hi
>>
>> CXF user pointed to [1] where it is recommended to show boolean matrix parameters with their names only.
>>
>> I wonder if JAX-RS applications are expected to support requests like
>>
>> /path;inStokeOnly
>>
>> where we have
>>
>> @GET
>> @Path("path")
>> public Response getInStock(@MatrixParam("inStockOnly") boolean inStockOnly) {}
>>
>> It is easy to check if a matrix parameter has no value in which case it is defaulted to 'true' but I'm not sure what PathSegment.getMatrixParameters().get("inStockOnly") should return, return, may be 'true'...
>>
>> Would it be a good idea for JAX-RS to support it ? WADL is of course not JAX-RS specific but it appears some users expect the support of matrix parameters as per [1]
>>
>> Thanks, Sergey
>>
>>
>>
>> [1] http://www.w3.org/Submission/wadl/#x3-130002.6.1
>