-
-
Notifications
You must be signed in to change notification settings - Fork 209
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
some tests of the interactions between $id, $anchor and $ref
- Loading branch information
1 parent
c3f4319
commit 9d0c502
Showing
6 changed files
with
319 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
[ | ||
{ | ||
"description": "non-schema object containing a plain-name $id property", | ||
"schema": { | ||
"$defs": { | ||
"const_not_anchor": { | ||
"const": { | ||
"$id": "#not_a_real_anchor" | ||
} | ||
} | ||
}, | ||
"if": { | ||
"const": "skip not_a_real_anchor" | ||
}, | ||
"then": true, | ||
"else" : { | ||
"$ref": "#/$defs/const_not_anchor" | ||
} | ||
}, | ||
"tests": [ | ||
{ | ||
"description": "skip traversing definition for a valid result", | ||
"data": "skip not_a_real_anchor", | ||
"valid": true | ||
}, | ||
{ | ||
"description": "const at const_not_anchor does not match", | ||
"data": 1, | ||
"valid": false | ||
} | ||
] | ||
}, | ||
{ | ||
"description": "non-schema object containing an $id property", | ||
"schema": { | ||
"$defs": { | ||
"const_not_id": { | ||
"const": { | ||
"$id": "not_a_real_id" | ||
} | ||
} | ||
}, | ||
"if": { | ||
"const": "skip not_a_real_id" | ||
}, | ||
"then": true, | ||
"else" : { | ||
"$ref": "#/$defs/const_not_id" | ||
} | ||
}, | ||
"tests": [ | ||
{ | ||
"description": "skip traversing definition for a valid result", | ||
"data": "skip not_a_real_id", | ||
"valid": true | ||
}, | ||
{ | ||
"description": "const at const_not_id does not match", | ||
"data": 1, | ||
"valid": false | ||
} | ||
] | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
[ | ||
{ | ||
"description": "non-schema object containing a plain-name $id property", | ||
"schema": { | ||
"$defs": { | ||
"const_not_anchor": { | ||
"const": { | ||
"$id": "#not_a_real_anchor" | ||
} | ||
} | ||
}, | ||
"if": { | ||
"const": "skip not_a_real_anchor" | ||
}, | ||
"then": true, | ||
"else" : { | ||
"$ref": "#/$defs/const_not_anchor" | ||
} | ||
}, | ||
"tests": [ | ||
{ | ||
"description": "skip traversing definition for a valid result", | ||
"data": "skip not_a_real_anchor", | ||
"valid": true | ||
}, | ||
{ | ||
"description": "const at const_not_anchor does not match", | ||
"data": 1, | ||
"valid": false | ||
} | ||
] | ||
}, | ||
{ | ||
"description": "non-schema object containing an $id property", | ||
"schema": { | ||
"$defs": { | ||
"const_not_id": { | ||
"const": { | ||
"$id": "not_a_real_id" | ||
} | ||
} | ||
}, | ||
"if": { | ||
"const": "skip not_a_real_id" | ||
}, | ||
"then": true, | ||
"else" : { | ||
"$ref": "#/$defs/const_not_id" | ||
} | ||
}, | ||
"tests": [ | ||
{ | ||
"description": "skip traversing definition for a valid result", | ||
"data": "skip not_a_real_id", | ||
"valid": true | ||
}, | ||
{ | ||
"description": "const at const_not_id does not match", | ||
"data": 1, | ||
"valid": false | ||
} | ||
] | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters