jsonix-schema-compiler: Problems with generating enumLeafs
I’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
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 22 (21 by maintainers)
Commits related to this issue
- Issue #67. — committed to highsource/jsonix-schema-compiler by highsource 8 years ago
- #67 added enumerable types for all built-in types — committed to benmarch/jsonix-schema-compiler by CLWebDev 8 years ago
- #67 added enumerable types for all built-in types — committed to benmarch/jsonix-schema-compiler by benmarch 8 years ago
- Merge pull request #70 from benmarch/issue-67-enums #67 added enumerable types for all built-in types — committed to highsource/jsonix-schema-compiler by highsource 8 years ago
- Working of #67. — committed to highsource/jsonix-schema-compiler by highsource 8 years ago
- Working on #67. — committed to highsource/jsonix-schema-compiler by highsource 8 years ago
- Working on #67. — committed to highsource/jsonix-schema-compiler by highsource 8 years ago
- Issue #67 work in progress. — committed to highsource/jsonix-schema-compiler by highsource 8 years ago
- Issue #67 work in progress. — committed to highsource/jsonix-schema-compiler by highsource 8 years ago
- Issue #67 work in progress. — committed to highsource/jsonix-schema-compiler by highsource 8 years ago
- Issue #67. — committed to highsource/jsonix-schema-compiler by highsource 8 years ago
- Issue #67 missing commits. — committed to highsource/jsonix-schema-compiler by highsource 8 years ago
- Issue #67 WIP. Still getting double allOf.allOf generated. — committed to highsource/jsonix-schema-compiler by highsource 8 years ago
- Issue #67 missing commits. — committed to highsource/jsonix-schema-compiler by highsource 8 years ago
Coming this week. There’s one small problem to be solved with hierarchican
allOfs.