Closed
Description
Describe the bug
Hi,
Thanks for this awesome library. When using JsonSchema only (and have JsonForms generate a corresponding UISchema) JsonForms fails due to a stack over flow error.
The jsonSchema (minimal example) causing the error:
{
"type": "object",
"anyOf": [
{
"required": ["Option1"]
},
{
"required": ["Option2"]
}
],
"properties": {
"Option1": {
"type": "array",
"items": {
"type": "string",
"enum": [
"A",
"B"
]
}
},
"Option2": {
"type": "array",
"items": {
"type": "string",
"enum": [
"C"
]
}
}
}
}
When providing a UISchema (as of below) the form renders as expected:
{
"type": "HorizontalLayout",
"elements": [
{
"type": "Control",
"scope": "#/properties/Option1"
},
{
"type": "Control",
"scope": "#/properties/Option2"
}
]
}
Expected behavior
JsonForms derives a somewhat functional UI schema, or alternatively does not crash.
Steps to reproduce the issue
- Clone
https://github.com/eclipsesource/jsonforms-angular-seed
- Set
schema = {...}
to example above and setuischema = null;
- Use
npm start
and openlocalhost:4200
-> Browser (Chrome) crashes with Stack overflow
Working example
- Clone
https://github.com/eclipsesource/jsonforms-angular-seed
- Set
schema = {...}
and setuischema = {...};
to example above. - Use
npm start
and openlocalhost:4200
-> form is rendered as expected.
Screenshots
In which browser are you experiencing the issue?
Google Chrome 109.0.5414.75 (Official Build) (64-bit)
Which Version of JSON Forms are you using?
v3.0.0
Framework
Angular
RendererSet
Material
Additional context
I suspected the error to be somewhere in @jsonforms\core\src\generators\uischema.ts