brutusin / json-forms

JSON Schema to HTML form generator, supporting dynamic subschemas (on the fly resolution). Extensible and customizable library with zero dependencies. Bootstrap add-ons provided
http://brutusin.org/json-forms
Apache License 2.0
606 stars 168 forks source link

getData() fails for array nested in oneOf #133

Closed johnmorrell closed 3 years ago

johnmorrell commented 5 years ago

When using the demo site: http://brutusin.org/json-forms/

The following example fails to return JSON via 'getData()'. The issue appears to be where an array is nested within a oneOf.

{
   "oneOf":[
      {
         "title":"Numbers",
         "type":"array",
         "items":{
            "type":"string",
            "enum":[
               "1",
               "2"
            ]
         }
      },
      {
         "title":"Letters",
         "type":"array",
         "items":{
            "type":"string",
            "enum":[
               "A",
               "B"
            ]
         }
      }
   ]
}