users@jersey.java.net

Re: [Jersey] Generating a param's required attribute in WADL

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Tue, 27 Oct 2009 15:26:46 +0100

On Oct 27, 2009, at 2:40 PM, Louis Polycarpou wrote:

> Logged issue for this here:
>
> https://jersey.dev.java.net/issues/show_bug.cgi?id=399
>

Thanks!

We should have a prize for the person who submits issue 404 :-)

Paul.

> Regards,
> Louis
>
> On 21 Oct 2009, at 08:34, Paul Sandoz wrote:
>
>> Hi Louis,
>>
>> I do not think this is supported. One reason is JAX-RS does not
>> currently have a concept of a required parameter e.g. annotating
>> with @Required and if the parameter is absent a 400 response will
>> be returned.
>>
>> There had been some previous discussion on required parameters and
>> i thought an feature was logged but i cannot find it. Would you
>> like to log a feature?
>>
>> Paul.
>>
>> On Oct 20, 2009, at 9:34 PM, Louis Polycarpou wrote:
>>
>>> According to the WADL spec from 2006-11-09, a Parameter does not
>>> need to be specified if required is not set in the WADL:
>>>
>>> required Optionally indicates whether the parameter is required to
>>> be present or not, defaults to false (parameter not required).
>>>
>>> Is there a way to set this parameter using the WADL generator so
>>> that it appears in the WADL? This does not seem to be set
>>> automatically for form (template) or query param styles and I
>>> can't find a custom annotation to do it either.
>>>
>>> Thanks,
>>> Louis
>>>
>>> Louis Polycarpou (founder)
>>>
>>> <adjoovo-email.png>
>>> Adjoovo
>>> SERVICE-ORIENTED COLLABORATION
>>> http://adjoovo.com
>>> http://twitter.com/adjoovo
>>> +44 (0) 7786 136653
>>>
>>
>
>
> Louis Polycarpou (founder)
>
> <adjoovo-email.png>
> Adjoovo
> SERVICE-ORIENTED COLLABORATION
> http://adjoovo.com
> http://twitter.com/adjoovo
> +44 (0) 7786 136653
>
> Louis Polycarpou
> louis_at_adjoovo.com
>
>
>