Skip to content

Commit d2eb79f

Browse files
committed
Squashed 'json/' changes from 8c3d56d..8982b0b
8982b0b Merge pull request #243 from gregsdennis/master 432eab6 added draft-03 version f55b4c2 Added test for additional properties looking in applicator keywords git-subtree-dir: json git-subtree-split: 8982b0ba6d721b09d91ebbf2414fdf443e4740b4
1 parent 38e7f0b commit d2eb79f

File tree

4 files changed

+64
-0
lines changed

4 files changed

+64
-0
lines changed

tests/draft3/additionalProperties.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,5 +113,21 @@
113113
"valid": true
114114
}
115115
]
116+
},
117+
{
118+
"description": "additionalProperties should not look in applicators",
119+
"schema": {
120+
"extends": [
121+
{"properties": {"foo": {}}}
122+
],
123+
"additionalProperties": {"type": "boolean"}
124+
},
125+
"tests": [
126+
{
127+
"description": "properties defined in extends are not allowed",
128+
"data": {"foo": 1, "bar": true},
129+
"valid": false
130+
}
131+
]
116132
}
117133
]

tests/draft4/additionalProperties.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,5 +113,21 @@
113113
"valid": true
114114
}
115115
]
116+
},
117+
{
118+
"description": "additionalProperties should not look in applicators",
119+
"schema": {
120+
"allOf": [
121+
{"properties": {"foo": {}}}
122+
],
123+
"additionalProperties": {"type": "boolean"}
124+
},
125+
"tests": [
126+
{
127+
"description": "properties defined in allOf are not allowed",
128+
"data": {"foo": 1, "bar": true},
129+
"valid": false
130+
}
131+
]
116132
}
117133
]

tests/draft6/additionalProperties.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,5 +113,21 @@
113113
"valid": true
114114
}
115115
]
116+
},
117+
{
118+
"description": "additionalProperties should not look in applicators",
119+
"schema": {
120+
"allOf": [
121+
{"properties": {"foo": {}}}
122+
],
123+
"additionalProperties": {"type": "boolean"}
124+
},
125+
"tests": [
126+
{
127+
"description": "properties defined in allOf are not allowed",
128+
"data": {"foo": 1, "bar": true},
129+
"valid": false
130+
}
131+
]
116132
}
117133
]

tests/draft7/additionalProperties.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,5 +113,21 @@
113113
"valid": true
114114
}
115115
]
116+
},
117+
{
118+
"description": "additionalProperties should not look in applicators",
119+
"schema": {
120+
"allOf": [
121+
{"properties": {"foo": {}}}
122+
],
123+
"additionalProperties": {"type": "boolean"}
124+
},
125+
"tests": [
126+
{
127+
"description": "properties defined in allOf are not allowed",
128+
"data": {"foo": 1, "bar": true},
129+
"valid": false
130+
}
131+
]
116132
}
117133
]

0 commit comments

Comments
 (0)