Skip to content

primitive XML types incorrectly mapped for JSON Schema #109

@vzhukovskyy

Description

@vzhukovskyy

I am generating JSON Schema with jsonix using the command
java -jar jsonix-schema-compiler-full-2.3.7.jar -generateJsonSchema -p test_datatypes test_datatypes.xsd

unsignedByte is mapped to short (unsignedByte expected),
unsignedShort - to int (unsignedShort expected),
unsingedInt - to long (unsignedInt expected),
unsignedLong - to integer (unsignedLong expected)

I'd like to attach input xsd and output jsonschema , but it requires write permission to the repo, so pasting xsd here:

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
    elementFormDefault="qualified" attributeFormDefault="unqualified">

    <xs:element name="TestObject" type="TestObject" />
    <xs:complexType name="TestObject">
        <xs:attribute name="UnsignedByteField" type="xs:unsignedByte" />
        <xs:attribute name="UnsignedShort" type="xs:unsignedShort" />
        <xs:attribute name="UnsingedIntField" type="xs:unsignedInt" />
        <xs:attribute name="UnsingedLongField" type="xs:unsignedLong" />

        <xs:attribute name="ByteField" type="xs:byte" />
        <xs:attribute name="ShortField" type="xs:short" />
        <xs:attribute name="IntField" type="xs:int" />
        <xs:attribute name="LongField" type="xs:long" />

        <xs:attribute name="FloatField" type="xs:float" />
        <xs:attribute name="DoubleField" type="xs:double" />

        <xs:attribute name="BooleanField" type="xs:boolean" />

        <xs:attribute name="StringField" type="xs:string" />

        <xs:attribute name="DateField" type="xs:date" />
    </xs:complexType>

</xs:schema>

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions