jspg progress
This commit is contained in:
76
tests/fixtures/old/defs.json
vendored
Normal file
76
tests/fixtures/old/defs.json
vendored
Normal file
@ -0,0 +1,76 @@
|
||||
[
|
||||
{
|
||||
"description": "valid definition schema (using $defs)",
|
||||
"schema": {
|
||||
"$defs": {
|
||||
"foo": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"$ref": "#/$defs/foo"
|
||||
},
|
||||
"tests": [
|
||||
{
|
||||
"description": "valid definition",
|
||||
"data": 1,
|
||||
"valid": true
|
||||
},
|
||||
{
|
||||
"description": "invalid definition",
|
||||
"data": "a",
|
||||
"valid": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "valid definition schema (using definitions for compat)",
|
||||
"schema": {
|
||||
"definitions": {
|
||||
"foo": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"$ref": "#/definitions/foo"
|
||||
},
|
||||
"tests": [
|
||||
{
|
||||
"description": "valid definition",
|
||||
"data": 1,
|
||||
"valid": true
|
||||
},
|
||||
{
|
||||
"description": "invalid definition",
|
||||
"data": "a",
|
||||
"valid": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "nested definitions",
|
||||
"schema": {
|
||||
"$defs": {
|
||||
"foo": {
|
||||
"$defs": {
|
||||
"bar": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"$ref": "#/$defs/foo/$defs/bar"
|
||||
}
|
||||
},
|
||||
"$ref": "#/$defs/foo"
|
||||
},
|
||||
"tests": [
|
||||
{
|
||||
"description": "valid nested definition",
|
||||
"data": "foo",
|
||||
"valid": true
|
||||
},
|
||||
{
|
||||
"description": "invalid nested definition",
|
||||
"data": 1,
|
||||
"valid": false
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user