Skip to content

Commit 77e0411

Browse files
committed
draft-06: properties keyword with boolean schemas
1 parent 6956f20 commit 77e0411

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

tests/draft6/properties.json

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,5 +88,36 @@
8888
"valid": false
8989
}
9090
]
91+
},
92+
{
93+
"description": "properties with boolean schema",
94+
"schema": {
95+
"properties": {
96+
"foo": true,
97+
"bar": false
98+
}
99+
},
100+
"tests": [
101+
{
102+
"description": "no property present is valid",
103+
"data": {},
104+
"valid": true
105+
},
106+
{
107+
"description": "only 'true' property present is valid",
108+
"data": {"foo": 1},
109+
"valid": true
110+
},
111+
{
112+
"description": "only 'false' property present is invalid",
113+
"data": {"bar": 2},
114+
"valid": false
115+
},
116+
{
117+
"description": "both properties present is invalid",
118+
"data": {"foo": 1, "bar": 2},
119+
"valid": false
120+
}
121+
]
91122
}
92123
]

0 commit comments

Comments
 (0)