Skip to main content

[jax-rs-spec users] Re: Bean Validation question

  • From: Santiago Pericas-Geertsen <Santiago.PericasGeertsen@...>
  • To: Gunnar Morling <gunnar.morling@...>, Emmanuel Bernard <ebernard@...>
  • Cc: Marek Potociar <marek.potociar@...>, users@...
  • Subject: [jax-rs-spec users] Re: Bean Validation question
  • Date: Wed, 27 Jun 2012 11:25:22 -0300

Hi Gunnar,

Thanks for this detailed email, Ron

I must admit I cannot convince myself whether asking users to add the annotation to validate or asking users to add the annotation to disable is correct. That's why I had not replied yet. At the moment, I tend to agree with Santiago that this should be on by default.

Yes, I think for the JAX-RS case that probably makes sense.

The question is whether that's something which must be defined by the
spec or whether a user might simply enable validation on a global
level using some sort of descriptor file (like validation.xml for BV
or beans.xml for CDI). I think personally I'd prefer the latter option
as it is a bit less “auto-magic“. A way to globally turn off method
validation would probably needed in the case it's implicitly enabled
by default.

 Have you given any more thought to this issue? I.e., the ability to globally turn validation on/off?

I don't know though, whether there is such global descriptor for JAX-XS.

 We don't have one. If BV does not provide a mechanism for this, we'll likely need to define a new annotation in JAX-RS to disable validation.


-- Santiago

[jax-rs-spec users] Re: Bean Validation question

Santiago Pericas-Geertsen 06/27/2012

[jax-rs-spec users] Re: Bean Validation question

Gunnar Morling 06/27/2012
Please Confirm