Hi everyone!
I’m working on a recursive schema that could have a leaf or a branch that could recursively have leaf/branch.
When I try to add a children I got a lot of logs from the AJV validator:
Combinator subschema is not self contained, can't hand it over to AJV
and after a while, it ends up throwing a max recursive error:
Uncaught (in promise) Maximum recursive updates exceeded in component . This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.
This is the JSON schema I’m using:
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Configuration",
"type": "object",
"definitions": {
"tree_leaf": {
"type": "object",
"properties": {
"value": {
"type": "string"
},
"label": {
"description": "A human readable name (if left out the value will be title cased)",
"type": "string"
}
},
"required": ["value"],
"additionalProperties": false
},
"tree_branch": {
"type": "object",
"properties": {
"children": {
"description": "Array of children. Either children or value needs to be provided",
"$ref": "#/definitions/tree_options"
},
"label": {
"description": "A human readable name (if left out the value will be title cased)",
"type": "string"
}
},
"required": ["children", "label"],
"additionalProperties": false
},
"tree_options": {
"type": "array",
"uniqueItems": true,
"items": {
"oneOf": [
{
"title": "Leaf",
"$ref": "#/definitions/tree_leaf"
},
{
"title": "Branch",
"$ref": "#/definitions/tree_branch"
}
]
}
},
"tree_picker": {
"properties": {
"values": {
"$ref": "#/definitions/tree_options"
}
},
"additionalProperties": false
}
},
"properties": {
"tree_picker": {
"description": "Tree picker widget",
"$ref": "#/definitions/tree_picker"
}
},
"additionalProperties": false
}
Any help will be more than welcome! Thanks! ![]()
