-
-
Notifications
You must be signed in to change notification settings - Fork 149
Closed
Description
I think I encountered an issue in the schema generation of records that are unions:
Line 53 in 605e79f
| for (NamedType subType : subTypes) { |
Given the following example (using Jakarta annotations and the introspector that follows with it):
@XmlType(name = "Super")
@XmlAccessType(FIELD)
@XmlSeeAlso(Sub.class)
class Super {
@XmlElement(required = true)
String foo; // getter, setter
}
@XmlType(name = "Sub")
@XmlAccessType(FIELD)
class Sub extends Super {
@XmlElement(required = true)
String bar; // getter, setter
}where the class Sub is correctly identified, a value of Super is not allowed in the created union.
To avoid this issue, unionSchemas should also include type, if type is non-abstract.