Draft7 if/then/else ref tests need to be wrapped in an allOf.
Thanks
{
"description": "ref to if",
"schema": {
- "$ref": "http://example.com/ref/if",
+ "allOf": [
+ {"$ref": "http://example.com/ref/if"},
+ {
"if": {
"$id": "http://example.com/ref/if",
"type": "integer"
}
+ }
+ ]
},
"tests": [
{
{
"description": "ref to then",
"schema": {
- "$ref": "http://example.com/ref/then",
+ "allOf": [
+ {"$ref": "http://example.com/ref/then"},
+ {
"then": {
"$id": "http://example.com/ref/then",
"type": "integer"
}
+ }
+ ]
},
"tests": [
{
{
"description": "ref to else",
"schema": {
- "$ref": "http://example.com/ref/else",
+ "allOf": [
+ {"$ref": "http://example.com/ref/else"},
+ {
"else": {
"$id": "http://example.com/ref/else",
"type": "integer"
}
+ }
+ ]
},
"tests": [
{
