users@jax-rs-spec.java.net

[jax-rs-spec users] [jsr339-experts] Re: Link 'produces' and 'consumes' parameters

From: Sergey Beryozkin <sberyozkin_at_talend.com>
Date: Fri, 17 Aug 2012 13:24:23 +0100

On 17/08/12 11:41, Sergey Beryozkin wrote:
> Hi All,
>
> Can you remind me please where can I look at the syntax of 'produces'
> and 'consumes' parameters [1] ? Not seeing them at [2]
>

Well, I can see Link 'type' attribute which is supposed to serve as a
hint and 'produces' parameter seems to be duplicating 'type' but also
extending it, given that the 'type' is supposed to have a single value only.

So, are we talking about JAX-RS extension parameters ? Do not see
anything wrong with that per se, except that it's unlikely any of the
non-JAX-RS consumers will be able to understand them, so JAX-RS servers
would have to set 'produces' but also 'type' (listing one of the
produces values) to get the chance of the interoperable Link consumption
working.

The syntax is also important: would 'produces' & 'consumes' lists
support media type parameters ? If yes how it will fir into the overall
Link syntax.

I wonder if we should just limit the support of media types to the
'type' attribute and postpone the support for multiple produces/consumes
types when we have some realistic cases

> Thanks, Sergey
>
> [1]
> http://jax-rs-spec.java.net/nonav/2.0-SNAPSHOT/apidocs/javax/ws/rs/core/Link.html
>
> [2] http://tools.ietf.org/html/rfc5988#section-5