Skip to content

Conversation

@borderss
Copy link

This fixes an issue described in #275

For example, in such a situation:

<xs:complexType name="ArrayOfint">
	<xs:sequence>
		<xs:element minOccurs="0" maxOccurs="unbounded" name="int" type="xs:int"/>
	</xs:sequence>
</xs:complexType>
<xs:element name="ArrayOfint" nillable="true" type="tns:ArrayOfint"/>
<xs:complexType name="ArrayOfstring">
	<xs:sequence>
		<xs:element minOccurs="0" maxOccurs="unbounded" name="string" nillable="true" type="xs:string"/>
	</xs:sequence>
</xs:complexType>
<xs:element name="ArrayOfstring" nillable="true" type="tns:ArrayOfstring"/>

the complex types are generated to such structs:

type ArrayOfint struct {
	int []int32 `xml:"int,omitempty" json:"int,omitempty"` // int is a reserved word, should be `Aint` instead
}

type ArrayOfstring struct {
	Astring []*string `xml:"string,omitempty" json:"string,omitempty"`
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant