|
[
{
"description" : "$id inside an unknown keyword is not a real identifier" ,
"comment" : "the implementation must not be confused by an $id in locations we do not know how to parse" ,
"schema" : {
"$defs" : {
"id_in_unknown0" : {
"not" : {
"array_of_schemas" : [
{
"type" : "null"
}
]
}
},
"real_id_in_schema" : {
"type" : "string"
},
"id_in_unknown1" : {
"not" : {
"object_of_schemas" : {
"foo" : {
"type" : "integer"
}
}
}
}
},
"anyOf" : [
{ "$ref" : "#/$defs/id_in_unknown0" },
{ "$ref" : "#/$defs/id_in_unknown1" },
]
},
"tests" : [
{
"description" : "type matches second anyOf, which has a real schema in it" ,
"data" : "a string" ,
"valid" : true
},
{
"description" : "type matches non-schema in first anyOf" ,
"data" : null ,
"valid" : false
},
{
"description" : "type matches non-schema in third anyOf" ,
"data" : 1,
"valid" : false
}
]
}
]
|