lacerda 2.1.4.beta1 → 2.1.4.beta2
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/CHANGELOG.markdown +2 -1
- data/lib/lacerda/compare/json_schema.rb +6 -7
- data/lib/lacerda/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 71c56c5058384e3ab9389f6633dd510b9d50498d
|
|
4
|
+
data.tar.gz: 04fce6e09bec4144382033f2d5bd3729ff54b72e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e48c02b02612199cf19193617522f7611b5731e65b970189c682cb31cf1b2d9e9480f584ac484136beccdda97035dfabf1d03768418fb747c5bad629e26d4b75
|
|
7
|
+
data.tar.gz: fdd53fed2a48fa3fdb4cff036303befcae886247d65059b68245bd32afa8a2ec50dbdf20e51137bc40257a89181aa2e75cd55c38d7848afaad8f9ce17cdefeac
|
data/CHANGELOG.markdown
CHANGED
|
@@ -9,6 +9,7 @@ module Lacerda
|
|
|
9
9
|
:ERR_MISSING_REQUIRED => "The published object has an optional property that you marked as required in your specification.",
|
|
10
10
|
:ERR_MISSING_TYPE_AND_REF_AND_ONE_OF => 'A property has to either have a "type", "oneOf" or "$ref" property.',
|
|
11
11
|
:ERR_TYPE_MISMATCH => "The published object has a property with a different type than the consumer's specification.",
|
|
12
|
+
:ERR_NOT_IMPLEMENTED => "Not implemented.",
|
|
12
13
|
:ERR_NOT_SUPPORTED => 'I don\'t yet know what to do when the consumer\'s specification has a "$ref" defined and the publisher\'s specification has a "type".'
|
|
13
14
|
}
|
|
14
15
|
|
|
@@ -168,15 +169,13 @@ module Lacerda
|
|
|
168
169
|
end
|
|
169
170
|
end
|
|
170
171
|
|
|
171
|
-
if consume['type'] == 'array'
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
return _e(:ERR_ARRAY_ITEM_MISMATCH, location, nil) unless matched
|
|
172
|
+
if consume['type'] == 'array' && publish['type'] == 'array'
|
|
173
|
+
if !consume['items'].is_a?(Hash) || !publish['items'].is_a?(Hash)
|
|
174
|
+
return _e(:ERR_NOT_IMPLEMENTED, location, "'items' can only be hash (schema)")
|
|
175
|
+
elsif !schema_contains?(publish: publish['items'], consume: consume['items'])
|
|
176
|
+
return _e(:ERR_ARRAY_ITEM_MISMATCH, location, nil)
|
|
177
177
|
end
|
|
178
178
|
end
|
|
179
|
-
|
|
180
179
|
true
|
|
181
180
|
end
|
|
182
181
|
|
data/lib/lacerda/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: lacerda
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.1.4.
|
|
4
|
+
version: 2.1.4.beta2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jannis Hermanns
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-09-
|
|
11
|
+
date: 2017-09-28 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|