Closed AurelienMarchand closed 1 week ago
sorry, but the issue is still present on the website (https://opis.io/json-schema/2.x/conditional-subschemas.html#if-then-else):
Schema Tab:
{
"if": {
"type": "string"
},
"then": {
"minLength": 3
},
"else": {
"const": 0
}
}
Example Tab:
"abc" | valid - string of length 3
-- | --
"abcd" | valid - string of length 4
0 | valid
0.0 | valid
"ab" | valid - string of length 2 <<<<<<<<<<========= THIS SHOULD SAY "invalid - string of length 2"
1 | invalid - not a string and not 0
["abc"] | invalid - not a string and not 0
Pages are not published yet
In the documentation for Conditional subschemas (https://opis.io/json-schema/2.x/conditional-subschemas.html), under the entry "If-Then-Else", the examples contain an error:
Input Status "ab" valid - string of length 2
This should be invalid as it is a string, and the condition is that it must be of minLength 3.