users@jax-rs-spec.java.net

[jax-rs-spec users] [jsr339-experts] Re: Bean validation for Response entities

From: Sergey Beryozkin <sberyozkin_at_talend.com>
Date: Tue, 5 Nov 2013 17:45:07 +0000

Hi Santiago
On 05/11/13 17:32, Santiago Pericas-Geertsen wrote:
>
> On Nov 5, 2013, at 5:15 AM, Sergey Beryozkin <sberyozkin_at_talend.com> wrote:
>
>> Hi Santiago, All
>>
>> Are the runtimes supporting a Bean Validation feature (Chapter 7 of the spec) expected to support the validation of the response entities wrapped in JAX-RS Response ?
>>
>
> That's a great question. I believe the spec is mute about this case. So I think we can neither forbid not mandate that behavior. We should, however, clarify this in the next update.
>
We just discussed it at CXF, IMHO makes sense to support the validation
of Response-wrapped beans, if a method returning a bean directly would
get a proper validation done, and the next method returning the same
bean with some extra Response properties won't then it can be problematic
> The RI does support validation in this case.
>
+1. CXF has been supporting it too, for the last 45 mins or so :-)

Sergey

> -- Santiago
>