What I want to achieve with the example JSON schema below is to apply a condition where if the "name" string is equal to "type1" to require the "settingsType1" array inside the "settings" object and if it is equal to "type2" to require the "settingsType2" object, how can I do that?
{
"type": "object",
"properties": {
"properties": {
"name": {
"type": "string",
"enum": [
"type1",
"type2"
]
},
"settings": {
"type": "object",
"properties": {
"settingsType1": {
"type": "array"
},
"settingsType2": {
"type": "string"
}
}
}
}
}
}