Skip to content

Commit

Permalink
Add unit test for GoComply#135
Browse files Browse the repository at this point in the history
  • Loading branch information
Niklas Nett committed Aug 23, 2024
1 parent e7cfc1f commit 1f57aac
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
21 changes: 21 additions & 0 deletions tests/xsd-examples/valid/issue135.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?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>
19 changes: 19 additions & 0 deletions tests/xsd-examples/valid/issue135.xsd.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// Code generated by https://github.com/gocomply/xsd2go; DO NOT EDIT.
// Models for
package issue135

import (
"encoding/xml"
)

// XSD ComplexType declarations

type Aaa struct {
XMLName xml.Name

Bbb string `xml:"BBB"`

Ccc []string `xml:"CCC"`
}

// XSD SimpleType declarations

0 comments on commit 1f57aac

Please sign in to comment.