FasterXML / jackson-module-jaxb-annotations

(DEPRECATED!!!) Moved to: https://github.com/FasterXML/jackson-modules-base/
https://github.com/FasterXML/jackson-modules-base
44 stars 20 forks source link

JaxbAnnotationIntrospector does not pick up 'required' property of @XmlAttribute #47

Closed phantomjinx closed 9 years ago

phantomjinx commented 9 years ago

While converting jaxb annotated classes into a JsonSchema, I noticed that attributes with the @XmlAttribute(required = true) annotation are included in the latter schema but do not respect the required property. Debugging the JaxbAnnotationIntrospector, I noticed that hasRequiredMarker() only looks for the @XmlElement annotation and not the @XmlAttribute annotation, despite the latter being checked by this method.

cowtowncoder commented 9 years ago

Good catch, thank you for reporting it. I'll have a look.