Hello,
I’m trying to use a oneOf array combined with dependencies keyword to have a dynamic schema, using JSON Forms with React/Material. It’s not rendering as expected (the dependent properties aren’t displaying once the first property value is selected, although there are error messages displaying relating to these invisible properties). Snippet below. Note that I’m doing this in the JSON schema, I haven’t yet looked at UI schema options.
Any advice on how to make this work would be great.
"softDelete": {
"description": "",
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"Source Entity",
"Resolved Entity",
"Relationship"
]
}
},
"required": [
"type"
],
"dependencies": {
"type": {
"oneOf": [
{
"properties": {
"type": {
"enum": [
"Source Entity"
]
},
"sourceName": {
"type": "string"
}
},
"required": [
"sourceName"
]
},
{
"properties": {
"type": {
"enum": [
"Resolved Entity"
]
},
"resName": {
"type": "string"
}
},
"required": [
"resName"
]
},
{
"properties": {
"type": {
"enum": [
"Relationship"
]
},
"relName": {
"type": "string"
}
},
"required": [
"relname"
]
}
]
}
}
}