Skip to content

Commit e4e1a22

Browse files
committed
Draft7 if/then/else ref tests need to be wrapped in an allOf.
Thanks #631 (comment)
1 parent f5bd2f6 commit e4e1a22

File tree

1 file changed

+27
-15
lines changed

1 file changed

+27
-15
lines changed

tests/draft7/ref.json

Lines changed: 27 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -822,11 +822,15 @@
822822
{
823823
"description": "ref to if",
824824
"schema": {
825-
"$ref": "http://example.com/ref/if",
826-
"if": {
827-
"$id": "http://example.com/ref/if",
828-
"type": "integer"
829-
}
825+
"allOf": [
826+
{"$ref": "http://example.com/ref/if"},
827+
{
828+
"if": {
829+
"$id": "http://example.com/ref/if",
830+
"type": "integer"
831+
}
832+
}
833+
]
830834
},
831835
"tests": [
832836
{
@@ -844,11 +848,15 @@
844848
{
845849
"description": "ref to then",
846850
"schema": {
847-
"$ref": "http://example.com/ref/then",
848-
"then": {
849-
"$id": "http://example.com/ref/then",
850-
"type": "integer"
851-
}
851+
"allOf": [
852+
{"$ref": "http://example.com/ref/then"},
853+
{
854+
"then": {
855+
"$id": "http://example.com/ref/then",
856+
"type": "integer"
857+
}
858+
}
859+
]
852860
},
853861
"tests": [
854862
{
@@ -866,11 +874,15 @@
866874
{
867875
"description": "ref to else",
868876
"schema": {
869-
"$ref": "http://example.com/ref/else",
870-
"else": {
871-
"$id": "http://example.com/ref/else",
872-
"type": "integer"
873-
}
877+
"allOf": [
878+
{"$ref": "http://example.com/ref/else"},
879+
{
880+
"else": {
881+
"$id": "http://example.com/ref/else",
882+
"type": "integer"
883+
}
884+
}
885+
]
874886
},
875887
"tests": [
876888
{

0 commit comments

Comments
 (0)