lumeohq / xsd-parser-rs

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

Struct generated from simpleContent with extention lacks field generated from base #83

Open victor-soloviev opened 4 years ago

victor-soloviev commented 4 years ago

From

<xs:complexType name="reasontext">
    <xs:simpleContent>
    <xs:extension base="xs:string">
      <xs:attribute ref="xml:lang" use="required"/>
    </xs:extension>
  </xs:simpleContent>
  </xs:complexType>

we generate

#[derive(Default, PartialEq, Debug, YaSerialize, YaDeserialize)]
#[yaserde(
    prefix = "tns",
    namespace = "tns: http://www.w3.org/2003/05/soap-envelope"
)]
pub struct Reasontext {
    #[yaserde(attribute, prefix = "xml" rename = "lang")]
    pub lang: String,
}

which, obviously, lacks another String field that represents reason itself