Vjacheslav,

Exactly, methods + complex parameters always get annotated with @Valid with beanValidation active.

Query parameters never get @Valid.

Best regards,

Johannes


Am 08.09.2016 um 12:51 schrieb Vjacheslav V. Borisov:
2016-09-08 12:43 GMT+04:00 Sergey Beryozkin <[email protected]>:

As I know, only xsd:enumeration types are projected to custom class by
default, all other simpleTypes projected to java.lang.String,
hower, if we map some xsd type to java class, then i think this should
work, but there is no such jaxb generator, to do such class generation
automatically, so this is also gigantic effort :)

If the parameters can refer to the complex types (as opposed to simple
types) then, with a BeanValidation aware JAXB plugin (the one linked to
before), then a Java class with BeanVal annotations can be produced, this
is what led to updating wadl-to-java adding @Valid annotations if
"-beanValidation" option is set.
Am I missing something ?

We are not using complex types in query parameters, only simple ones (and
as we discussed before implemeting validation of custom simpleType params
in not worth it)

So, @Valid will be added to all Bean paramaters, including params referring
to complexTypes and representations linked to root xsd elements.
And if i don't use complexTypes in query parameters, i get only payload
parameters annotated with @Valid?


Reply via email to