-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed
Description
Prerequisites
- I have read the documentation;
- In the case of a bug report, I understand that providing a SSCCE example is tremendously useful to the maintainers.
Description
Current implementation is not able to handle recursive schema
Steps to Reproduce
- Make recursive schema like this:
{
"definitions": {
"TPNode": {
"title": "TPNode",
"description": "TPNode",
"type": "object",
"properties": {
"name": { "type": "string" },
"children": {
"type": "array",
"items": {
"$ref": "#/definitions/TPNode"
}
}
}
}
},
"$ref": "#/definitions/TPNode"
}
- Try to render
See fiddle: https://jsfiddle.net/b1r3k/dssabb76/2/
Expected behavior
Form should be rendered according to valid schema as done for example here
Actual behavior
RangeError exception is being thrown
RangeError: Maximum call stack size exceeded
toIdSchema
webpack:///./~/react-jsonschema-form/lib/utils.js?:475:18
toIdSchema
webpack:///./~/react-jsonschema-form/lib/utils.js?:483:12
toIdSchema
webpack:///./~/react-jsonschema-form/lib/utils.js?:491:22
toIdSchema
webpack:///./~/react-jsonschema-form/lib/utils.js?:480:12
toIdSchema
webpack:///./~/react-jsonschema-form/lib/utils.js?:483:12
toIdSchema
webpack:///./~/react-jsonschema-form/lib/utils.js?:491:22
Version
Current release (0.41.2)
Metadata
Metadata
Assignees
Labels
No labels