Merge commit '45cf1fb8a6a0b7ea1ab8de8ea9fc7addb0ffd149'
* commit '45cf1fb8a6a0b7ea1ab8de8ea9fc7addb0ffd149': Squashed 'json/' changes from 3cef243..9208016
This commit is contained in:
commit
62e942ea37
|
@ -76,6 +76,7 @@ This suite is being used by:
|
|||
* [json_schema (Dart)](https://github.com/patefacio/json_schema)
|
||||
* [tv4 (JavaScript)](https://github.com/geraintluff/tv4)
|
||||
* [Jsonary (JavaScript)](https://github.com/jsonary-js/jsonary)
|
||||
* [json-schema (Ruby)](https://github.com/hoxworth/json-schema)
|
||||
|
||||
If you use it as well, please fork and send a pull request adding yourself to
|
||||
the list :).
|
||||
|
|
|
@ -0,0 +1,49 @@
|
|||
[
|
||||
{
|
||||
"description": "invalid type for default",
|
||||
"schema": {
|
||||
"properties": {
|
||||
"foo": {
|
||||
"type": "integer",
|
||||
"default": []
|
||||
}
|
||||
}
|
||||
},
|
||||
"tests": [
|
||||
{
|
||||
"description": "valid when property is specified",
|
||||
"data": {"foo": 13},
|
||||
"valid": true
|
||||
},
|
||||
{
|
||||
"description": "still valid when the invalid default is used",
|
||||
"data": {},
|
||||
"valid": true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "invalid string value for default",
|
||||
"schema": {
|
||||
"properties": {
|
||||
"bar": {
|
||||
"type": "string",
|
||||
"minLength": 4,
|
||||
"default": "bad"
|
||||
}
|
||||
}
|
||||
},
|
||||
"tests": [
|
||||
{
|
||||
"description": "valid when property is specified",
|
||||
"data": {"bar": "good"},
|
||||
"valid": true
|
||||
},
|
||||
{
|
||||
"description": "still valid when the invalid default is used",
|
||||
"data": {},
|
||||
"valid": true
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
|
@ -0,0 +1,49 @@
|
|||
[
|
||||
{
|
||||
"description": "invalid type for default",
|
||||
"schema": {
|
||||
"properties": {
|
||||
"foo": {
|
||||
"type": "integer",
|
||||
"default": []
|
||||
}
|
||||
}
|
||||
},
|
||||
"tests": [
|
||||
{
|
||||
"description": "valid when property is specified",
|
||||
"data": {"foo": 13},
|
||||
"valid": true
|
||||
},
|
||||
{
|
||||
"description": "still valid when the invalid default is used",
|
||||
"data": {},
|
||||
"valid": true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "invalid string value for default",
|
||||
"schema": {
|
||||
"properties": {
|
||||
"bar": {
|
||||
"type": "string",
|
||||
"minLength": 4,
|
||||
"default": "bad"
|
||||
}
|
||||
}
|
||||
},
|
||||
"tests": [
|
||||
{
|
||||
"description": "valid when property is specified",
|
||||
"data": {"bar": "good"},
|
||||
"valid": true
|
||||
},
|
||||
{
|
||||
"description": "still valid when the invalid default is used",
|
||||
"data": {},
|
||||
"valid": true
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
Loading…
Reference in New Issue