highsource / highsource/jsonix-schema-compiler
xsd choice with an element and a sequence generates an array type!
- Dominant language
- Java
- Stars
- 138
- Forks
- 37
- PR merge metrics
- No merged PRs in 30d
Description
Please see the Input XSD and the Output JSON below.
The "BackStub" is a choice between a single element("None") and a sequence("Period", "Calculation"). However, the generated JSON schema suggests the "BackStub" is an array with minItems=1 & maxItems=2.
This seems wrong to me, could you please advise?
Input XSD:
```
```
#
Output JSON:
```
"FloatingLegStubs.BackStub":{
"type":"object",
"title":"FloatingLegStubs.BackStub",
"required":[
"noneOrPeriodAndCalculation"
],
"properties":{
"noneOrPeriodAndCalculation":{
"title":"noneOrPeriodAndCalculation",
"allOf":[
{
"type":"array",
"items":{
"anyOf":[
{
"anyOf":[
{
"$ref":"#/definitions/None"
}
],
"elementName":{
"localPart":"None",
"namespaceURI":""
}
},
{
"anyOf":[
{
"$ref":"#/definitions/BackStubPeriod"
}
],
"elementName":{
"localPart":"Period",
"namespaceURI":""
}
},
{
"anyOf":[
{
"$ref":"#/definitions/StubCalculationStyle"
}
],
"elementName":{
"localPart":"Calculation",
"namespaceURI":""
}
}
]
},
"maxItems":2,
"minItems":1
}
],
"propertyType":"elements"
}
},
"typeType":"classInfo",
"propertiesOrder":[
"noneOrPeriodAndCalculation"
]
}
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.