Skip to content

Commit 5a888a6

Browse files
committed
draft-06: dependencies keyword with boolean subschemas
1 parent 53858ff commit 5a888a6

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

tests/draft6/dependencies.json

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,5 +127,36 @@
127127
"valid": false
128128
}
129129
]
130+
},
131+
{
132+
"description": "dependencies with boolean subschemas",
133+
"schema": {
134+
"dependencies": {
135+
"foo": true,
136+
"bar": false
137+
}
138+
},
139+
"tests": [
140+
{
141+
"description": "object with property having schema true is valid",
142+
"data": {"foo": 1},
143+
"valid": true
144+
},
145+
{
146+
"description": "object with property having schema false is invalid",
147+
"data": {"bar": 2},
148+
"valid": false
149+
},
150+
{
151+
"description": "object with both properties is invalid",
152+
"data": {"foo": 1, "bar": 2},
153+
"valid": false
154+
},
155+
{
156+
"description": "empty object is valid",
157+
"data": {},
158+
"valid": true
159+
}
160+
]
130161
}
131162
]

0 commit comments

Comments
 (0)