json_schema 0.20.8 → 0.20.9
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/parser.rb +2 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e21a1e4dc51b894f1374f46872ed71f49d2b45702dc99783286aafefca69f8c8
|
4
|
+
data.tar.gz: 7002f0a54a8de78318b676d9f1c0465dc8ff40d70163b3d83b8fafa412cee52e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a9d51a9b64731ad8e2aa3bb79f65e3b7c555a38b181a6a00789b9025903a5049e1be0043a3637456a07d008f8878b2a61f56b3a6b9bacd90c1fc7acb20a5415a
|
7
|
+
data.tar.gz: 71e615dc945f0bd926f41211e56a48424f0f45df706df4394779ebf03d96316764a0b6433b2413469e314d0c1a42d08bcc0f479c2c0b2f3736732c4815993361
|
data/lib/json_schema/parser.rb
CHANGED
@@ -362,10 +362,10 @@ module JsonSchema
|
|
362
362
|
end
|
363
363
|
|
364
364
|
def validate_type(schema, types, field)
|
365
|
-
friendly_types =
|
366
|
-
types.map { |t| FRIENDLY_TYPES[t] || t }.sort.uniq.join("/")
|
367
365
|
value = schema.data[field]
|
368
366
|
if !value.nil? && !types.any? { |t| value.is_a?(t) }
|
367
|
+
friendly_types =
|
368
|
+
types.map { |t| FRIENDLY_TYPES[t] || t }.sort.uniq.join("/")
|
369
369
|
message = %{#{value.inspect} is not a valid "#{field}", must be a #{friendly_types}.}
|
370
370
|
@errors << SchemaError.new(schema, message, :invalid_type)
|
371
371
|
nil
|
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.20.
|
4
|
+
version: 0.20.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brandur
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-06-16 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email:
|
@@ -69,7 +69,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
69
69
|
- !ruby/object:Gem::Version
|
70
70
|
version: '0'
|
71
71
|
requirements: []
|
72
|
-
rubygems_version: 3.
|
72
|
+
rubygems_version: 3.1.4
|
73
73
|
signing_key:
|
74
74
|
specification_version: 4
|
75
75
|
summary: A JSON Schema V4 and Hyperschema V4 parser and validator.
|