Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions tests/draft2019-09/infinite-loop-detection.json
Original file line number Diff line number Diff line change
@@ -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
}
]
}
]
36 changes: 36 additions & 0 deletions tests/draft2019-09/optional/infinite-loop-detection.json
Original file line number Diff line number Diff line change
@@ -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
}
]
}
]
36 changes: 36 additions & 0 deletions tests/draft3/infinite-loop-detection.json
Original file line number Diff line number Diff line change
@@ -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": {
"definitions": {
"int": { "type": "integer" }
},
"allOf": [
{
"properties": {
"foo": {
"$ref": "#/definitions/int"
}
}
},
{
"additionalProperties": {
"$ref": "#/defintions/int"
}
}
]
},
"tests": [
{
"description": "passing case",
"data": { "foo": 1 },
"valid": true
},
{
"description": "failing case",
"data": { "foo": "a string" },
"valid": false
}
]
}
]
36 changes: 36 additions & 0 deletions tests/draft3/optional/infinite-loop-detection.json
Original file line number Diff line number Diff line change
@@ -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": {
"definitions": {
"int": { "type": "integer" }
},
"allOf": [
{
"properties": {
"foo": {
"$ref": "#/definitions/int"
}
}
},
{
"additionalProperties": {
"$ref": "#/defintions/int"
}
}
]
},
"tests": [
{
"description": "passing case",
"data": { "foo": 1 },
"valid": true
},
{
"description": "failing case",
"data": { "foo": "a string" },
"valid": false
}
]
}
]
36 changes: 36 additions & 0 deletions tests/draft4/infinite-loop-detection.json
Original file line number Diff line number Diff line change
@@ -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": {
"definitions": {
"int": { "type": "integer" }
},
"allOf": [
{
"properties": {
"foo": {
"$ref": "#/definitions/int"
}
}
},
{
"additionalProperties": {
"$ref": "#/defintions/int"
}
}
]
},
"tests": [
{
"description": "passing case",
"data": { "foo": 1 },
"valid": true
},
{
"description": "failing case",
"data": { "foo": "a string" },
"valid": false
}
]
}
]
36 changes: 36 additions & 0 deletions tests/draft4/optional/infinite-loop-detection.json
Original file line number Diff line number Diff line change
@@ -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": {
"definitions": {
"int": { "type": "integer" }
},
"allOf": [
{
"properties": {
"foo": {
"$ref": "#/definitions/int"
}
}
},
{
"additionalProperties": {
"$ref": "#/defintions/int"
}
}
]
},
"tests": [
{
"description": "passing case",
"data": { "foo": 1 },
"valid": true
},
{
"description": "failing case",
"data": { "foo": "a string" },
"valid": false
}
]
}
]
36 changes: 36 additions & 0 deletions tests/draft6/infinite-loop-detection.json
Original file line number Diff line number Diff line change
@@ -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": {
"definitions": {
"int": { "type": "integer" }
},
"allOf": [
{
"properties": {
"foo": {
"$ref": "#/definitions/int"
}
}
},
{
"additionalProperties": {
"$ref": "#/defintions/int"
}
}
]
},
"tests": [
{
"description": "passing case",
"data": { "foo": 1 },
"valid": true
},
{
"description": "failing case",
"data": { "foo": "a string" },
"valid": false
}
]
}
]
36 changes: 36 additions & 0 deletions tests/draft6/optional/infinite-loop-detection.json
Original file line number Diff line number Diff line change
@@ -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": {
"definitions": {
"int": { "type": "integer" }
},
"allOf": [
{
"properties": {
"foo": {
"$ref": "#/definitions/int"
}
}
},
{
"additionalProperties": {
"$ref": "#/defintions/int"
}
}
]
},
"tests": [
{
"description": "passing case",
"data": { "foo": 1 },
"valid": true
},
{
"description": "failing case",
"data": { "foo": "a string" },
"valid": false
}
]
}
]
36 changes: 36 additions & 0 deletions tests/draft7/infinite-loop-detection.json
Original file line number Diff line number Diff line change
@@ -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": {
"definitions": {
"int": { "type": "integer" }
},
"allOf": [
{
"properties": {
"foo": {
"$ref": "#/definitions/int"
}
}
},
{
"additionalProperties": {
"$ref": "#/defintions/int"
}
}
]
},
"tests": [
{
"description": "passing case",
"data": { "foo": 1 },
"valid": true
},
{
"description": "failing case",
"data": { "foo": "a string" },
"valid": false
}
]
}
]
36 changes: 36 additions & 0 deletions tests/draft7/optional/infinite-loop-detection.json
Original file line number Diff line number Diff line change
@@ -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": {
"definitions": {
"int": { "type": "integer" }
},
"allOf": [
{
"properties": {
"foo": {
"$ref": "#/definitions/int"
}
}
},
{
"additionalProperties": {
"$ref": "#/defintions/int"
}
}
]
},
"tests": [
{
"description": "passing case",
"data": { "foo": 1 },
"valid": true
},
{
"description": "failing case",
"data": { "foo": "a string" },
"valid": false
}
]
}
]