Conditional required rule
kris2214 opened this issue · 1 comments
kris2214 commented
Consider I have a json schema as below:
....
{
"properties" : {
"minimumDelay" : {
"type" : "number"
},
"length" : {
"type" : "number"
},
},
"required": {
"minimumDelay",
"length"
}
Here the json data will be valid if I enter both minimumDelay and length values.
But my requirement is json data must be valid when I enter either 1 of the values(like XOR case). How my schema must be modified to achieve the same?
Anthropic commented
This would be handled with oneOf validation which isn't currently supported without making a basic add-on to provide it.