[bv-dev] Method validation - cont'd
Emmanuel Bernard
emmanuel at hibernate.org
Tue May 15 04:54:12 EDT 2012
On 14 mai 2012, at 14:53, Hardy Ferentschik wrote:
>>
>> * Further discuss @MethodValidated annotation with other EGs (e.g. JAX-RS)
>
> What's about @ValidateContract, @ContractValidated or even just @Constract
> This get the "design by contract" idea in as well and it avoids the ambiguity when
> it comes to constructors.
Naming wise, that's an interesting approach to use contract in the name.
Another question we had with the JAX-RS team was whether or not such annotation would be mandatory
to validate contracts by default.
In JPA and JSF, validation is on by default and I see no reason why JAX-RS would need to add a @ContractValidated
annotation to activate method-level validation. Of course the annotation would still be useful to customize
validation and disable it altogether.
More information about the beanvalidation-dev
mailing list