users@jax-rs-spec.java.net

[jax-rs-spec users] Re: Nested BeanParams

From: Sergey Beryozkin <sberyozkin_at_talend.com>
Date: Tue, 6 Oct 2015 21:17:47 +0100

Hi Markus

I don't mind either way but just don't want to guess and keep pleading
to have some clarity on it :-).

Sergey
Clearly the docs do not mention this option
On 06/10/15 18:28, Markus KARG wrote:
>
> I think we should look at the spec from a different angle: It clearly
> defines what the annotation "@BeanParams" is good for and where it is
> to be used. If that matches on the nested bean class, it is a valid
> use that MUST be supported.
>
> *From:*Sergey Beryozkin [mailto:sberyozkin_at_talend.com]
> *Sent:* Dienstag, 6. Oktober 2015 11:16
> *To:* jsr370-experts_at_jax-rs-spec.java.net
> *Subject:* Re: Nested BeanParams
>
> Ok, I did some home work, the related text at
>
> https://jersey.java.net/documentation/latest/jaxrs-resources.html#d0e2193
>
> says nothing about nested BeanParams, example:
>
> "@BeanParam
> <http://jax-rs-spec.java.net/nonav/2.0/apidocs/javax/ws/rs/BeanParam.html>
> can contain all parameters injections injections (@PathParam
> <http://jax-rs-spec.java.net/nonav/2.0/apidocs/javax/ws/rs/PathParam.html>,
> @QueryParam
> <http://jax-rs-spec.java.net/nonav/2.0/apidocs/javax/ws/rs/QueryParam.html>,
> @MatrixParam
> <http://jax-rs-spec.java.net/nonav/2.0/apidocs/javax/ws/rs/MatrixParam.html>,
> @HeaderParam
> <http://jax-rs-spec.java.net/nonav/2.0/apidocs/javax/ws/rs/HeaderParam.html>,
> @CookieParam
> <http://jax-rs-spec.java.net/nonav/2.0/apidocs/javax/ws/rs/CookieParam.html>,
> @FormParam
> <http://jax-rs-spec.java.net/nonav/2.0/apidocs/javax/ws/rs/FormParam.html>)."
>
> but does not specify the possible use of nested @BeanParams.
>
> I guess I'm OK about having nested @BeanParams supported, but I'm
> still curious if it is RI-specific only or not.
> Marek, can you please be nice again and clarify :-) ? I can open a
> minor documentation issue to clarify the use of BeanParam ?
>
> Sergey
>
>
> On 05/10/15 17:54, Sergey Beryozkin wrote:
>
> Hi
>
> We have an issue reported related to the fact that no nested
> BeanParams are supported in CXF,
> where a top level @BeanParam POJO has one of its
> methods/properties also annotated with @BeanParam, example:
>
> public class A {
> @Context HttpHeaders headers;
> @BeanParam B b;
> }
>
> public class B {
> @QueryParam String someQueryParam;
> }
>
> @GET
> public Response get(@BeanParam A a);
>
> Marek, can you please confirm it is supposed to work ?
> BeanParam docs can indeed be read such that nested BeanParams are
> expected to work, though it seems a bit too complex.
> The user has confirmed it works in Jersey - but is it RI specific
> or very much spec compliant ?
>
> Thanks, Sergey
>
>