users@jax-rs-spec.java.net

[jax-rs-spec users] [jsr339-experts] Re: Re: Re: Re: Re-introducing Bean Validation support in JAX-RS 2.0

From: Marek Potociar <marek.potociar_at_oracle.com>
Date: Fri, 23 Nov 2012 16:26:27 +0100

On Nov 23, 2012, at 3:58 PM, Sergey Beryozkin <sberyozkin_at_talend.com> wrote:

> On 23/11/12 14:53, Marek Potociar wrote:
>>
>> On Nov 21, 2012, at 11:51 PM, Sergey Beryozkin<sberyozkin_at_talend.com> wrote:
>>
>>> On 21/11/12 15:00, Marek Potociar wrote:
>>>> I just re-introduced the classes we had. ValidationException and ValidationError. I'm however fine revisiting this.
>>>
>>> I'd like to propose dropping ValidationException or at least consider it extending InternalServerErrorException.
>>> I prefer the former option - I'm not sure we should make it easy for the list of validation errors exposing some the info about the resource class/method available to the client - it is 400 or 401 as far as the client is concerned given that some of the request properties have failed the validation? Actually, if it were to stay - it should extend one of ClientErrorExceptions ?
>>
>> Validation failure on server can be both, client error (request data) and server error (response data). So the extending just Client or Server base exception would not make sense. Also, some client-side validation issues should clearly be treated as 404 and not 400 (e.g. validation failure caused by invalid URI-based information (path, query, matrix param) IMO.
>>
>
> Makes sense but this confirms we can not use ValidationException to cover all the cases - perhaps the spec can recommend what HTTP error statuses are to be reported in specific validation failure cases ?

Yes, that's something I had in mind too.

Marek

>
>> As for dropping the exception, I know that Santiago had some reasons to keep it, so I'd like to wait for him to reply to you. (He's off work for the rest of the week as most US-based folks...)
> OK
>
> Cheers, Sergey
>>
>> Marek
>>>
>>> Sergey
>>>
>>>>
>>>> Marek
>>>>
>>>> On Nov 21, 2012, at 3:13 PM, Bill Burke<bburke_at_redhat.com> wrote:
>>>>
>>>>> Does the integration have specific APIs/classes? This is something I'd like to revisit if so. I'm not convinced we need any special APIs/classes for BV support.
>>>>>
>>>>> On 11/21/2012 4:46 AM, Marek Potociar wrote:
>>>>>> Experts,
>>>>>>
>>>>>> Last week we have received an approval from the Java EE spec leads and Java EE project management to align release of JAX-RS 2.0 with BV 1.1. As such, we plan to include the formerly dropped BV integration support in JAX-RS 2.0 again. I assume this change in plans is welcome by most of you. Still, please let me know if you have any concerns about the change in plans.
>>>>>>
>>>>>> Kind regards,
>>>>>> Marek Potociar
>>>>>>
>>>>>
>>>>> --
>>>>> Bill Burke
>>>>> JBoss, a division of Red Hat
>>>>> http://bill.burkecentral.com
>>>>
>>
>
>