You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I may not be 100% right but the way the tool is designed to take the array of objects as reference.
Refer the accounts.json and accounts.xsd under the test resources
to see how the array of objects are handled.
This as per my inference is not a bug but how you get to use the tool.
I tried to use your tool with this sample below , I just changed the price number property by prices , an array of object with price property
{ "type":"array", "items":{ "type":"object", "properties":{ "prices":{ "type":"array", "items":{ "type":"object", "properties":{ "price":{ "type":"number" } }, "required":["price"] } }, "name":{ "type":"string", "minLength":5, "maxLength":32 }, "isExpired":{ "default":false, "type":"boolean" }, "manufactured":{ "type":"string", "format":"date-time" } }, "required":[ "prices", "name", "manufactured" ] } }
If I try to convert this schema in xsd with validateXsdSchema set to true i have this error
{"status":400,"message":"org.xml.sax.SAXParseException; lineNumber: 8; columnNumber: 36; Unexpected <complexType> appears at line 8 column 36","error":"java.lang.IllegalArgumentException"}
If I try to convert this schema in xsd with validateXsdSchema set to false i have this result
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:x="http://example.com/myschema.xsd" elementFormDefault="qualified" targetNamespace="http://example.com/myschema.xsd"> <complexType name="array"> <sequence> <element name="prices"> <complexType> <sequence> <element maxOccurs="unbounded" minOccurs="0"> <complexType name=""> <sequence> <element name="price" type="decimal"/> </sequence> </complexType> </element> </sequence> </complexType> </element> <element name="name"> <simpleType> <restriction base="string"> <minLength value="5"/> <maxLength value="32"/> </restriction> </simpleType> </element> <element minOccurs="0" name="isExpired" type="boolean"/> <element name="manufactured" type="dateTime"/> </sequence> </complexType> </schema>
I think this result comport misplaced complexType whitout name attribute.
Am I missing something?
The text was updated successfully, but these errors were encountered: