summaryrefslogtreecommitdiff
path: root/json/tests/draft2019-09/infinite-loop-detection.json
diff options
context:
space:
mode:
Diffstat (limited to 'json/tests/draft2019-09/infinite-loop-detection.json')
-rw-r--r--json/tests/draft2019-09/infinite-loop-detection.json36
1 files changed, 36 insertions, 0 deletions
diff --git a/json/tests/draft2019-09/infinite-loop-detection.json b/json/tests/draft2019-09/infinite-loop-detection.json
new file mode 100644
index 0000000..9c3c362
--- /dev/null
+++ b/json/tests/draft2019-09/infinite-loop-detection.json
@@ -0,0 +1,36 @@
+[
+ {
+ "description": "evaluating the same schema location against the same data location twice is not a sign of an infinite loop",
+ "schema": {
+ "$defs": {
+ "int": { "type": "integer" }
+ },
+ "allOf": [
+ {
+ "properties": {
+ "foo": {
+ "$ref": "#/$defs/int"
+ }
+ }
+ },
+ {
+ "additionalProperties": {
+ "$ref": "#/$defs/int"
+ }
+ }
+ ]
+ },
+ "tests": [
+ {
+ "description": "passing case",
+ "data": { "foo": 1 },
+ "valid": true
+ },
+ {
+ "description": "failing case",
+ "data": { "foo": "a string" },
+ "valid": false
+ }
+ ]
+ }
+]