highsource / highsource/jsonix-schema-compiler

sequence element from my XSD schema was generated improperly.

Open
#78 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
138
Forks
37
PR merge metrics
No merged PRs in 30d

Description

Hi!

I tried to generate a JSON schema from a sample XSD. All elements were generated successfully to json schema except one element from my XSD schema was generated improperly.

And here is the element copied from input XSD:

```xml


Use this element for listing the document history






Submission number for the given Status type



```
+++++++ See the generated jsonschema below ++++++
I do not know why
[jsonschema_issues.txt](https://github.com/highsource/jsonix-schema-compiler/files/619543/jsonschema_issues.txt)
name: 'contentstatusAndSUBMISSIONNUMBER',

```
===================================================================

localName: 'GHSTS.DOCUMENTS.DOCUMENT.DOCUMENTGENERIC.CONTENTSTATUSHISTORY',
typeName: null,
propertyInfos: [{
name: 'contentstatusAndSUBMISSIONNUMBER',
required: true,
minOccurs: 2,
collection: true,
elementTypeInfos: [{
elementName: 'CONTENT_STATUS',
typeInfo: '.TYPECONTENTSTATUSSTRUCT'
}, {
elementName: 'SUBMISSION_NUMBER'
}],
type: 'elements'
}]
}
```
```
=================================================================================================

"GHSTS.DOCUMENTS.DOCUMENT.DOCUMENTGENERIC.CONTENTSTATUSHISTORY":{
"type":"object",
"title":"GHSTS.DOCUMENTS.DOCUMENT.DOCUMENTGENERIC.CONTENTSTATUSHISTORY",
"required":[
"contentstatusAndSUBMISSIONNUMBER"
],
"properties":{
"contentstatusAndSUBMISSIONNUMBER":{
"title":"contentstatusAndSUBMISSIONNUMBER",
"allOf":[
{
"type":"array",
"items":{
"anyOf":[
{
"anyOf":[
{
"$ref":"#/definitions/TYPECONTENTSTATUSSTRUCT"
}
],
"elementName":{
"localPart":"CONTENT_STATUS",
"namespaceURI":"http://www.oecd.org/GHSTS"
}
},
{
"anyOf":[
{
"$ref":"http://www.jsonix.org/jsonschemas/w3c/2001/XMLSchema.jsonschema#/definitions/string"
}
],
"elementName":{
"localPart":"SUBMISSION_NUMBER",
"namespaceURI":"http://www.oecd.org/GHSTS"
}
}
]
},
"minItems":2
}
],
"propertyType":"elements"
}
},
"typeType":"classInfo",
"propertiesOrder":[
"contentstatusAndSUBMISSIONNUMBER"
]
},
```

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.