json_schema 0.12.2 → 0.12.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/json_schema/validator.rb +5 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 31395eb7e52a7db2179d05106ae5343f1594baa0
|
|
4
|
+
data.tar.gz: d774fea3c3d10ccc79b736f93f82e2aacdbe4137
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4eb913f82edf712661fdb3b0ffa6573e860e8434b8dd694cdb43c8c57abd8bc8432b719f665f1a9aa2bcd7b16daaf27c0baeaad8b68bf0815747087402f16df0
|
|
7
|
+
data.tar.gz: 32cd78771c4be15d9a7047315fd89e656d68ba7d8538b39d05cf7edc494f75b21306bc549744bc61f591d29f669333dc1cfd31b1f36cae56ff664c366d1a7b56
|
|
@@ -129,9 +129,13 @@ module JsonSchema
|
|
|
129
129
|
# validated according to subschema
|
|
130
130
|
if schema.additional_properties.is_a?(Schema)
|
|
131
131
|
extra = get_extra_keys(schema, data)
|
|
132
|
-
extra.
|
|
132
|
+
validations = extra.map do |key|
|
|
133
133
|
validate_data(schema.additional_properties, data[key], errors, path + [key])
|
|
134
134
|
end
|
|
135
|
+
|
|
136
|
+
# true only if all keys validate
|
|
137
|
+
validations.all?
|
|
138
|
+
|
|
135
139
|
# boolean indicates whether additional properties are allowed
|
|
136
140
|
else
|
|
137
141
|
validate_extra(schema, data, errors, path)
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: json_schema
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.12.
|
|
4
|
+
version: 0.12.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Brandur
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-
|
|
11
|
+
date: 2016-04-19 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: ecma-re-validator
|
|
@@ -107,7 +107,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
107
107
|
version: '0'
|
|
108
108
|
requirements: []
|
|
109
109
|
rubyforge_project:
|
|
110
|
-
rubygems_version: 2.
|
|
110
|
+
rubygems_version: 2.5.1
|
|
111
111
|
signing_key:
|
|
112
112
|
specification_version: 4
|
|
113
113
|
summary: A JSON Schema V4 and Hyperschema V4 parser and validator.
|