We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
<xsd:simpleType name="MyEnumeration"> <xsd:restriction base="xsd:NMTOKEN"> <xsd:enumeration value="first" /> <xsd:enumeration value="second" /> <xsd:enumeration value="third" /> </xsd:restriction> </xsd:simpleType> <xsd:simpleType name="MyEnumerationList"> <xsd:list itemType="MyEnumeration" /> </xsd:simpleType> <xsd:complexType name="Root"> <xsd:all> <xsd:element name="values" type="MyEnumerationList" default="first" /> </xsd:all> </xsd:complexType>
Generates
@dataclass class Root: values: List[MyEnumeration] = field( default_factory=MyEnumeration.FIRST, metadata={ "type": "Element", "namespace": "", "tokens": True, } )
It should be
@dataclass class Root: values: List[MyEnumeration] = field( default_factory=lambda: [MyEnumeration.FIRST], metadata={ "type": "Element", "namespace": "", "tokens": True, } )
The text was updated successfully, but these errors were encountered:
9909d52
No branches or pull requests
Generates
It should be
The text was updated successfully, but these errors were encountered: