Open nettnikl opened 2 months ago
Hey, the following:
<?xml version="1.0" encoding="UTF-8"?> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="qualified" version="1.0"> <xsd:complexType name="AAA"> <xsd:sequence> <xsd:element name="BBB" minOccurs="1" maxOccurs="1"> <xsd:simpleType> <xsd:restriction base="xsd:string"/> </xsd:simpleType> </xsd:element> <xsd:sequence> <xsd:element name="CCC" minOccurs="1" maxOccurs="unbounded"> <xsd:simpleType> <xsd:restriction base="xsd:string"/> </xsd:simpleType> </xsd:element> </xsd:sequence> </xsd:sequence> </xsd:complexType> </xsd:schema>
converts to:
// Code generated by https://github.com/gocomply/xsd2go; DO NOT EDIT. // Models for package test import ( "encoding/xml" ) // XSD ComplexType declarations type Aaa struct { XMLName xml.Name Bbb string `xml:",any"` } // XSD SimpleType declarations
While i would expect:
// Code generated by https://github.com/gocomply/xsd2go; DO NOT EDIT. // Models for package test import ( "encoding/xml" ) // XSD ComplexType declarations type Aaa struct { XMLName xml.Name Bbb string `xml:"BBB"` Ccc []string `xml:"CCC"` } // XSD SimpleType declarations
Hey, the following:
converts to:
While i would expect: