Skip to content

Why does a simple element in xsd result in an object in the json schema? #63

Open
@smhdfdl

Description

@smhdfdl

Example:

`<xsd:element name="MobileAppVer" nillable="true" minOccurs="0" type="xsd:string"/>`

Gives the following. Why is "type" an object and not just the value type:

                    `"mobileAppVer":{
                        "title":"mobileAppVer",
                        "allOf":[
                            {
                                "type":"object",
                                "properties":{
                                    "name":{
                                        "$ref":"http://www.jsonix.org/jsonschemas/w3c/2001/XMLSchema.jsonschema#/definitions/QName"
                                    },
                                    "value":{
                                        "$ref":"http://www.jsonix.org/jsonschemas/w3c/2001/XMLSchema.jsonschema#/definitions/string"
                                    }
                                },
                                "elementName":{
                                    "localPart":"MobileAppVer",
                                    "namespaceURI":""
                                }
                            }
                        ],
                        "propertyType":"elementRef",
                        "elementName":{
                            "localPart":"MobileAppVer",
                            "namespaceURI":""
                        }
                    },`

And for an xsd with no target namespace why is the localPart & namespaceURI needed?

Metadata

Metadata

Assignees

Labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions