json_schemer 0.2.5 → 0.2.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/json_schemer/schema/base.rb +3 -3
- data/lib/json_schemer/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6fb7d3d8b50f87d5e08647aedbbfc850e7c7378283923c41deb5ea42b69a38f8
|
4
|
+
data.tar.gz: '09a4c42ee2ba22422c57d7c4591745931d0bd7d6455dfb0c2e377e9cf7521a0f'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 146e560ae96d8f33640c51a1f6bc77e110ba45da5a41b08e0b5a139c65520680a65fc10e79e19cf204222bc8f1d0a1dadde5be6f4c9def1bba2d644ee4980795
|
7
|
+
data.tar.gz: ec892824f0b350015dec49ed380df33247d9f1cd0d78a6a36488828f90adbf7f2f0232cd0f843b4a1e7d1e096738861127648f4a84378a3885cb1d3e16ae1dd7
|
data/Gemfile.lock
CHANGED
@@ -36,7 +36,7 @@ module JSONSchemer
|
|
36
36
|
keywords: nil,
|
37
37
|
ref_resolver: DEFAULT_REF_RESOLVER
|
38
38
|
)
|
39
|
-
raise InvalidSymbolKey, 'schemas must use string keys' if schema.is_a?(Hash) && !schema.first.first.is_a?(String)
|
39
|
+
raise InvalidSymbolKey, 'schemas must use string keys' if schema.is_a?(Hash) && !schema.empty? && !schema.first.first.is_a?(String)
|
40
40
|
@root = schema
|
41
41
|
@format = format
|
42
42
|
@insert_property_defaults = insert_property_defaults
|
@@ -467,9 +467,9 @@ module JSONSchemer
|
|
467
467
|
dependencies = schema['dependencies']
|
468
468
|
property_names = schema['propertyNames']
|
469
469
|
|
470
|
-
if insert_property_defaults?
|
470
|
+
if insert_property_defaults? && properties
|
471
471
|
properties.each do |property, property_schema|
|
472
|
-
if !data.key?(property) && property_schema.key?('default')
|
472
|
+
if !data.key?(property) && property_schema.is_a?(Hash) && property_schema.key?('default')
|
473
473
|
data[property] = property_schema.fetch('default').clone
|
474
474
|
end
|
475
475
|
end
|
data/lib/json_schemer/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: json_schemer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Harsha
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-09-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -153,8 +153,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
153
153
|
- !ruby/object:Gem::Version
|
154
154
|
version: '0'
|
155
155
|
requirements: []
|
156
|
-
|
157
|
-
rubygems_version: 2.7.6
|
156
|
+
rubygems_version: 3.0.3
|
158
157
|
signing_key:
|
159
158
|
specification_version: 4
|
160
159
|
summary: JSON Schema validator. Supports drafts 4, 6, and 7.
|