highsource / highsource/jsonix-schema-compiler

Generate oneOf for xsd:choice

Open
#49 6 comments 0 reactions 1 assignee Claimed by @highsource View on GitHub
enhancement
Dominant language
Java
Stars
138
Forks
37
PR merge metrics
No merged PRs in 30d

Description

I'm trying to convert an XSD with lots of tags xsd:choice into a JSON Schema, using your compiler (through Clemens' http://www.xml-buddy.com/ValidatorBuddy.htm)

The good thing is that I got a JSON schema out, which is great already! However, I was expecting to get oneOf keywords. Example:

```





```

gets returned as:

``` "PostalCodeMunicipalityComplexType":{
"type":"object",
"title":"PostalCodeMunicipalityComplexType",
"properties":{
"structuredPostalCodeMunicipality":{
"title":"structuredPostalCodeMunicipality",
"allOf":[
{
"$ref":"#/definitions/StructuredPostalCodeMunicipalityComplexType"
}
],
"propertyType":"element",
"elementName":{
"localPart":"StructuredPostalCodeMunicipality",
"namespaceURI":"http://schema...."
}
},
"unstructuredPostalCodeMunicipality":{
"title":"unstructuredPostalCodeMunicipality",
"allOf":[
{
"$ref":"http://www.jsonix.org/jsonschemas/w3c/2001/XMLSchema.jsonschema#/definitions/string"
}
],
"propertyType":"element",
"elementName":{
"localPart":"UnstructuredPostalCodeMunicipality",
"namespaceURI":"http://schema..."
}
}
},
"typeType":"classInfo",
"typeName":{
"localPart":"PostalCodeMunicipalityComplexType",
"namespaceURI":"http://schema..."
},
"propertiesOrder":[
"structuredPostalCodeMunicipality",
"unstructuredPostalCodeMunicipality"
]
}
```

What am I doing wrong, or misunderstanding?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.