Problems with generating enumLeafs
See original GitHub issueI’m using this schema file ` <?xml version=“1.0” encoding=“UTF-8”?> <xsd:schema xmlns:xsd=“http://www.w3.org/2001/XMLSchema” xmlns=“http://foo.bar.EnumLeafSchema” targetNamespace=“http://foo.bar.EnumLeafSchema” elementFormDefault=“qualified”>
<xsd:element name=“UsesEnumLeaf”> <xsd:complexType> <xsd:sequence> <xsd:element name=“personTitle” type=“PersonTitleCodesEnumeration”></xsd:element> <xsd:element name=“personName” type=“xsd:string”></xsd:element> </xsd:sequence> </xsd:complexType> </xsd:element>
<xsd:simpleType name=“PersonTitleCodesEnumeration”> <xsd:restriction base=“xsd:string”> <xsd:enumeration value=“mr” /> <xsd:enumeration value=“ms” /> <xsd:enumeration value=“mrs” /> <xsd:enumeration value=“miss” /> <xsd:enumeration value=“dr” /> </xsd:restriction> </xsd:simpleType>
</xsd:schema> `
This is generated by the compiler:
var enumleafschema_bar_foo_Module_Factory = function () {
var enumleafschema_bar_foo = {
name: 'enumleafschema_bar_foo',
defaultElementNamespaceURI: 'http:\/\/foo.bar.EnumLeafSchema',
typeInfos: [{
localName: 'UsesEnumLeaf',
typeName: null,
propertyInfos: [{
name: 'personTitle',
required: true
}, {
name: 'personName',
required: true
}]
}, {
type: 'enumInfo',
localName: 'PersonTitleCodesEnumeration',
values: ['mr', 'ms', 'mrs', 'miss', 'dr']
}],
elementInfos: [{
elementName: 'UsesEnumLeaf',
typeInfo: '.UsesEnumLeaf'
}]
};
return {
enumleafschema_bar_foo: enumleafschema_bar_foo
};
};
But I expected:
localName: 'UsesEnumLeaf',
typeName: null,
propertyInfos: [{
name: 'personTitle',
required: true,
//This was missing in the generated mapping
typeInfo: '.PersonTitleCodesEnumeration'
}, {
name: 'personName',
required: true
}]
Is this a bug? My failure?
Kind regards,
Tom
Issue Analytics
- State:
- Created 7 years ago
- Comments:22 (21 by maintainers)
Top GitHub Comments
Coming this week. There’s one small problem to be solved with hierarchican
allOf
s.Thanks, @highsource! Works perfectly for me in 2.3.9.