Hey Guys,

    I'm in process trying to upgrade a DW 0.8.x application to 1.0 and I've 
run into something I am not sure I understand. We have a lot of endpoints 
that include LongParams, for example:

    @GET
    @UnitOfWork
    public List<User> getAll(@NotNull @QueryParam("account_id") LongParam 
accountId

    This no longer works, as we now get a:

HV000186: The constraint of type 'javax.validation.constraints.NotNull' 
defined on 'getAll.account_id' has multiple matching constraint validators 
which is due to an additional value handler of type 
'io.dropwizard.jersey.validation.ParamValidatorUnwrapper'. It is unclear 
which value needs validating. Clarify configuration via 
@UnwrapValidatedValue.

   So, I understand this probably now needs @UnwrapValidatedValue after 
reading 
http://www.dropwizard.io/1.0.0/docs/manual/validation.html#optional-t-constraints
 

   But: does this mean *everywhere* we want to make a long parameter 
required we have to add that annotation? 
   
   This is such a basic and common case, the following seems very verbose:

    @GET
    @UnitOfWork
    public List<User> getAll(@UnwrapValidatedValue @NotNull @QueryParam(
"account_id") LongParam accountId

    Am I missing something?

Thanks,
Chris

-- 
You received this message because you are subscribed to the Google Groups 
"dropwizard-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to