users@jax-rs-spec.java.net

[jax-rs-spec users] [jsr339-experts] BeanParam beans without annotations ?

From: Sergey Beryozkin <sberyozkin_at_talend.com>
Date: Fri, 21 Mar 2014 10:31:35 +0000

Hi

We have a CXF extension where you can do something like

@GET
public Book getBook(@QueryParam("") BookParameters params);

It's a bit similar to BeanParam except that BookParameters is just a
regular bean with no JAX-RS annotations. It captures all/only the query
parameters which have the matching setters.

I wonder if it makes sense somehow to get BeanParam point to the bean
without annotations ?

may be

@GET
public Book getBook(@BeanParam(type = QueryParam) BookParameters params);

or may be there may be some interest in getting something like
QueryParam("") supported ? The plus is that it works quite well with
dealing with the open-ended sequence of specific parameter types
(query/header/etc) and requires no annotations on the bean.

I'm not going to push it further but if some of the above is of interest
then I will open a 2.1 enhancement request


Sergey