jsr370-experts@jax-rs-spec.java.net

Re: Nested BeanParams

From: Sergey Beryozkin <sberyozkin_at_talend.com>
Date: Tue, 6 Oct 2015 10:15:46 +0100

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
>
>
>