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
607 stars 168 forks source link

Bug in array with referenced object #69

Closed ychyrski closed 7 years ago

ychyrski commented 7 years ago
{
  "$schema": "http://json-schema.org/draft-03/schema#",
  "definitions": {
    "test": {
      "type": "object",
      "properties": {
        "test1": {
          "type": "string",
        }
      }
    }
  },
  "type": "object",
  "properties": {
    "sub": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/test"
      }
    }
  }
}

causes TypeError: Cannot read property 'test1' of undefined while trying to get data