gowsdl
gowsdl copied to clipboard
bad type generation for xs:choice + maxOccurs="unbounded"
This appears to be working in the fixtures, but not in my use case.
From Sono's WSDL...
<xs:complexType name="mediaList">
...
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="mediaCollection" type="tns:mediaCollection"/>
<xs:element name="mediaMetadata" type="tns:mediaMetadata"/>
</xs:choice>
</xs:complexType>
generates
type MediaList struct {
...
MediaCollection *MediaCollection `xml:"mediaCollection,omitempty" json:"mediaCollection,omitempty"`
MediaMetadata *MediaMetadata `xml:"mediaMetadata,omitempty" json:"mediaMetadata,omitempty"`
}
% gowsdl -v
🍀
% go version
go version go1.21.4 darwin/arm64