pimatic
Version:
A home automation server and framework for the Raspberry PI running on node.js
63 lines (60 loc) • 1.71 kB
JSON
[
{
"description": "asynchronously resolve a reference to an external schema",
"schema": {
"properties": {
"location": { "$ref": "http://www.jayschema.org/test-targets/geo.json#" }
}
},
"tests": [
{
"description": "matches schema",
"data": {
"location": {
"latitude": 48.8583,
"longitude": 2.2945
}
},
"valid": true
},
{
"description": "does not match schema",
"data": {
"location": {
"latitude": "hello"
}
},
"valid": false
}
]
},
{
"description": "asynchronously resolve a reference to an external schema (bare URI)",
"schema": {
"properties": {
"location": { "$ref": "http://www.jayschema.org/test-targets/geo.json" }
}
},
"tests": [
{
"description": "matches schema",
"data": {
"location": {
"latitude": 48.8583,
"longitude": 2.2945
}
},
"valid": true
},
{
"description": "does not match schema",
"data": {
"location": {
"latitude": "hello"
}
},
"valid": false
}
]
}
]