Santiago from the JAX-RS EG is concerned that we have created an
over-engineered solution to enable / disable method validation on a per
method basis.
We have good reasons for it but I am wondering if we can make it a bit
easier to enable or disable methods out of the box.
Remember, the default is to ignore getters. If we make
@ValidateExecutable.type default to ALL, enabling it on a getter would
be
@NotEmpty @ValidateExecutable
public String getAction() {...}
instead of
@NotEmpty @ValidateExecutable(type=ExecutableType.ALL)
public String getAction() {...}
We would still need the verbose approach to disable validation
@NotEmpty @ValidateExecutable(type=ExecutableType.NONE)
public String getAction() {...}
I am open to suggestions to make that easier on methods. I don't think
an additional annotation will make anything easier
Maybe renaming NONE with OFF might help? It's a bit weirder on a
class-level but that might work.
Thoughts?
Emmanuel