schematic-ipsum icon indicating copy to clipboard operation
schematic-ipsum copied to clipboard

internal $ref throws uncaught exception

Open cjnygard opened this issue 9 years ago • 0 comments

Modifying the sample JSON schema to add an internal ref to a previously defined object throws uncaught exception. Removing the "parent" object generates test data without exception.

{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "ipsum": "id"
    },
    "fullname": {
      "type": "object",
      "id": "ns:fullname",
      "properties": {
        "firstname": {
          "type": "string",
          "ipsum": "name"
        },
        "lastname": {
          "type": "string",
          "ipsum": "name"
        }
      }
    },
    "parent": {
      "type": "object",
      "$ref": "ns:fullname"
    },
    "email": {
      "type": "string",
      "format": "email"
    },
    "bio": {
      "type": "string",
      "ipsum": "sentence"
    },
    "age": {
      "type": "integer"
    },
    "avatar": {
      "type": "string",
      "ipsum": "small image"
    }
  }
}

cjnygard avatar Nov 27 '15 17:11 cjnygard