users@jersey.java.net

Re: [Jersey] WADL generation and required param

From: Marc Hadley <Marc.Hadley_at_Sun.COM>
Date: Thu, 26 Jun 2008 15:06:43 -0400

On Jun 26, 2008, at 2:46 PM, Martin Grotzke wrote:
>
> 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.
>
See third paragraph of:

https://jsr311.dev.java.net/nonav/javadoc/javax/ws/rs/DefaultValue.html

Essentially you get the Java-defined default value for the primitive
type.

I need to think about this some more but initially I like the idea of
an @Required in the JSR API.

Marc.

---
Marc Hadley <marc.hadley at sun.com>
CTO Office, Sun Microsystems.