On Nov 7, 2006, at 10:01 AM, Jerome Louvel wrote:
>
> I have one question regarding the WADL specification. After reading
> section
> 2.7.1 on "Query Parameters" and the XSD schema, it seems that it is
> not
> possible to define a query parameter that has either no value or an
> optional
> value.
>
> I'd like to be able to specify a URI like: http://example.com/
> widgets?flag
>
There is a "required" attribute on parameter that specifies whether a
value is required or not; parameters with no value are omitted from
the URI according the RFC 1866. Looking at the spec[1] for the
application/x-www-form-urlencoded format, the canonical format is "?
name=value&name2=value2", there doesn't appear to be any mention of
omitting the "=value" part even for something like a boolean - do you
have any pointers to where this kind of usage is specified ?
That said, for matrix URI parameters the convention is to omit the
"=value" for boolean parameters, see section 2.5.1 of the WADL spec.
Thanks,
Marc.
[1]
http://www.ietf.org/rfc/rfc1866.txt
---
Marc Hadley <marc.hadley at sun.com>
Business Alliances, CTO Office, Sun Microsystems.
- application/pkcs7-signature attachment: smime.p7s