Add test for defaults in derived schemas

Currently ignored as defaults are not yet implemented.
This commit is contained in:
Graham Esau 2019-12-08 13:12:09 +00:00
parent 1e9f36122d
commit 81eb53b590
2 changed files with 80 additions and 0 deletions

View file

@ -0,0 +1,43 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "MyStruct",
"type": "object",
"properties": {
"my_bool": {
"type": "boolean",
"default": false
},
"my_int": {
"type": "integer",
"format": "int32",
"default": 0
},
"my_struct2": {
"allOf": [
{
"$ref": "#/definitions/MyStruct2"
}
],
"default": {
"my_bool": false,
"my_int": 0
}
}
},
"definitions": {
"MyStruct2": {
"type": "object",
"properties": {
"my_bool": {
"type": "boolean",
"default": true
},
"my_int": {
"type": "integer",
"format": "int32",
"default": 6
}
}
}
}
}