I’m using the react material JSON forms and in my JSON schema I have the following:
"inputTable": {
"description": "",
"type": "object",
"properties": {
.
.
.
"sourceTableType": {
"description": "Whether the table is registered as an 'entity', or 'child' entity in Visual Investigator.",
"type": "string",
"enum": [
"entity",
"child"
]
},
"lastUpdatedAtTimeFieldName": {
"description": "The name of the datetime field that records when the last change was made to the record in the Visual Investigator table.",
"type": "string"
}
.
.
.
},
"anyOf": [
{
"properties": {
"sourceTableType": { "const": "entity" }
},
"required": ["lastUpdatedAtTimeFieldName"]
}
],
"required": [
.
.
.
]
}
where . . . indicates that there are other properties of my object that have been emitted to make the example more concise.
Essentially I’m trying to say that if sourceTableType === ‘entity’ then lastUpdatedAtTimeFieldName is required.
what happens when I use this schema is I get the following:
What am I doing wrong?