json-forms
json-forms copied to clipboard
recursive $ref iteration
Hello I have json schema with recursive $ref iteration, for example:
{
"definitions": {
"TPNode": {
"title": "TPNode",
"description": "TPNode",
"type": "object",
"properties": {
"selector": {
"type": "string",
"required": true
},
"attributes": {
"type": "array",
"items": {
"title": "Attribute",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
},
"children": {
"type": "array",
"items": {
"$ref": "#/definitions/TPNode"
}
},
"events": {
"type": "array",
"items": {
"title": "Event",
"type": "object",
"properties": {
"type": {
"type": "string"
},
"handler": {
"type": "object"
},
"dependencies": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}
}
},
"$ref": "#/definitions/TPNode"
}
when I am using this project with the json schema above then the create form button not working and I am getting "maximum call stack size exceeded" in the browser DevTool can some one help me and fix this bug?
Shai
hi did you solve this problem?
I am getting the same error.
{ "$schema": "http://json-schema.org/draft-03/schema#", "$ref": "#/definitions/data", "definitions" : { "data" : { "type" : "object", "properties" : { "menu" : { "$ref" : "#/definitions/menu" } }, "required" : ["menu"] }, "menu" : { "title" : "menu", "type" : "array", "items" : { "$ref" : "#/definitions/item" }, "minItems" : 1 }, "item" : { "title" : "menuitem", "type" : "object", "properties" : { "item" : { "type" : "string", "title" : "itemtext", "default" : "item" }, "href" : { "type" : "string", "title" : "itemhref", "default" : "/de" }, "menu" : { "title" : "menu", "oneOf" : [ { "title" : "no childs", "type":"null" }, { "$ref" : "#/definitions/menu" } ] } } } } }