Is there an elif/elseif/switch statement in JSON-Schema? I doesn't seem to be there.
Asked
Active
Viewed 1,425 times
1 Answers
1
You can use "allOf" with a list of objects of if-statements
"allOf": [
{
"if": {...},
"else": {...}
},
{
"if": {...},
"else": {...}
}
]
Be aware that this list needs to be on the level of the object to which items it refers!
source: https://json-schema.org/understanding-json-schema/reference/conditionals.html

Transfigurations
- 21
- 4