I would like to use oneOf schemes that differ only in the value of the xyType property. I would like to have two of them: one where xyType set to "1" , and the second where xyType any other value . Can this be done using json schemas?
"oneOf": [ { "properties": { "xyType": "enum": ["1"], "whatever" : "string" }, "type": "object" }, { "properties": { "xyType": "enum": [], /// NOT "1"? "whatever" : "string" }, "type": "object" } ]
source share