On Thu, 2008-06-26 at 20:33 +0200, Martin Grotzke wrote:
> Hi jersey devs,
>
> a wadl param has the attribute "required". The wadl generator right now
> does not set this attribute, as this would only be possible for
> primitives. For complex types (e.g. string) the generator does not have
> the possibility to determine, if a parameter is required or not.
>
> We see these options:
> 1) Add an attribute "required" to @*Param
> a) This can be interpreted by implementations, so that for required
> but missing params s.th. like status 400 would be returned,
> without invoking (the users) resource method
> b) This would require negotiation with jsr311 board
> 2) Add an annotation @Required to jersey
> a) This can be interpreted by jersey, so that for required
> but missing params s.th. like status 400 can returned, without
> invoking (the users) resource method
> b) Is s.th. like this possible without breaking jsr311 compliance?
> 3) Add some javadoc tag like @param.{paramname}.required that is just
> used for wadl generation and does not affect any runtime behavior.
Just thinking about this: for some paramater of primitive type (e.g.
int) I would expect that jersey returns some status 400, as the param is
obviously required. Why shall this be done for some types, but not for
all?
Therefore I would think it *should* be 1) and should be defined by
jsr311. Unfortunately I couldn't find anything related to this in the
spec.
Thanx for feedback,
cheers,
Martin
>
> What would you say is desired here?
>
> Cheers,
> Martin
>