Add support for xsd:restriction
henkesn opened this issue · 1 comments
henkesn commented
Creating a schema from WSDL/XSD which have xsd:restriction raised an error. Would be good to have that fixed by simply ignoring the restrictions in a first step. Some cases perhaps could also be mapped to enum later.
Example:
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="optional"/>
<xs:enumeration value="required"/>
<xs:enumeration value="prohibited"/>
</xs:restriction>
</xs:simpleType>
pso-aeb commented
XSD-Doc: https://www.w3schools.com/xml/schema_facets.asp
Should use the base as type for the field.
Map to enum seems plausible.
All other possible restrictions don't have a proper correspondence in GraphQL (AFAIS). But we could put them in the comment for the field.