json-schema-generator 0.0.7 → 0.0.8
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a609582455088a3808ae87d38a3428eaf708ece1
|
|
4
|
+
data.tar.gz: 3b344c54d042a5a477d9ce1230a90d87a9d11be2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: eedf9fc508448ea49c6c896040b82bf75c84bb32ecfba7e2543a5cef6c75f63dbd591fa4c0e85cd16222b9dbd7e153786aa5b18da940bcaae5af14a5b69a1ac6
|
|
7
|
+
data.tar.gz: 67ce96e8d18d8d555938d6336fff101e41132f088d7bdf53c75839aac958b59d6895eed93cb89a82e164e04edcc5e38a64ce116b42f65ad1f0f04c1539f7522f
|
|
@@ -33,7 +33,13 @@ module JSON
|
|
|
33
33
|
end
|
|
34
34
|
|
|
35
35
|
def required? child_key
|
|
36
|
-
|
|
36
|
+
begin
|
|
37
|
+
JsonPath.new(search_path(child_key)).on(@data).count == JsonPath.new(current_path).on(@data).count
|
|
38
|
+
rescue SyntaxError
|
|
39
|
+
# There are some special characters that can't be handled by JsonPath.
|
|
40
|
+
# e.g. if child key is OS-DCF:diskConfig
|
|
41
|
+
false
|
|
42
|
+
end
|
|
37
43
|
end
|
|
38
44
|
|
|
39
45
|
def child_keys
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: json-schema-generator
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.8
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Max Lincoln
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2013-
|
|
11
|
+
date: 2013-12-05 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: jsonpath
|