Hello everybody, 

I'm facing a strange behaviour in my Spring Boot app. I'm generating model 
classes with JAXB by using an xsd. e.g.
<xs:complexType name="precondition">
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="1" name="leftOperand"
type="xs:string" >
<xs:annotation>
<xs:documentation>
Define the left operand
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="1" maxOccurs="1" name="operator"
type="tns:operators" />
<xs:element minOccurs="0" maxOccurs="1" name="rightOperand"
type="xs:string" />
</xs:sequence>
</xs:complexType>

Therefore the "operator" should be required and it is in the JaxB generated 
classes.

However, in Swagger UI it is not. all my fields and elements are optional. 

<https://lh3.googleusercontent.com/-yxhEQH34rmo/WmtODZuokAI/AAAAAAAAISE/JixjQDrMiDAyiDOyESuoJcRddmS7aoVWACLcBGAs/s1600/Swagger.PNG>


Any advice is highly appreciated!
Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to