krasa / krasa-jaxb-tools

XJC / JAXB plugin for generation of Bean Validation Annotations (JSR-303) and replacing primitive types
Apache License 2.0
61 stars 47 forks source link

@Size for ArrayList/Collections/Maps #66

Open Tibor17 opened 6 years ago

Tibor17 commented 6 years ago

The DTO is generated and a collection is annotated with @XmlElementWrapper. Here it is expected that the element is a collection. I would like this extension to add @Size according to the minOccurs and maxOccurs. I know that XSD does not understand collection and I know that you bind particular annotation to particular element type in schema. Would you be able to recognize Java Collection and add the annotation @Size?