lumeohq / xsd-parser-rs

A xsd/wsdl => rust code generator written in rust
Apache License 2.0
100 stars 39 forks source link

Handling of case sensitive simple types #154

Open matzipan opened 11 months ago

matzipan commented 11 months ago

In this XSD, the following type exists:

<xsd:simpleType name="yesNoType">
   <xsd:restriction base="xsd:string">
      <xsd:enumeration value="YES"/>
      <xsd:enumeration value="yes"/>
      <xsd:enumeration value="NO"/>
      <xsd:enumeration value="no"/>
   </xsd:restriction>
</xsd:simpleType>

Because xsd-parser tries to change the case of the enum label from YES to Yes and from yes to YES, they clash.

xsd-parser could try to detect such cases and keep the case.

lkirkwood commented 7 months ago

162 addresses this but it is a breaking change so it might not get merged. It should fix this issue for you though.