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: 69ed2137db5f60e22f7c1ed761e655bdd21931fc
4
- data.tar.gz: 1e649eac8fa0392b7a1dad5238c620c75b321b50
3
+ metadata.gz: a609582455088a3808ae87d38a3428eaf708ece1
4
+ data.tar.gz: 3b344c54d042a5a477d9ce1230a90d87a9d11be2
5
5
  SHA512:
6
- metadata.gz: 64f4382b5a8f089a8d8d58c1997bcb6d095b5600eec3bef93aec8b7af2b58d5d82b63c7dbd9459a6dd041c2b3e8b0c8d766a1ffcd0cf2afbd36a540835755a3b
7
- data.tar.gz: 4f5bf1b70ebad07ea3be172e85a4108db9e4db27618d6cb3367c74c7e3eca7847dae5ba08dc03cd0364a0c92969cce419217d946648c22de4647dbde4bb78a06
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
- JsonPath.new(search_path(child_key)).on(@data).count == JsonPath.new(current_path).on(@data).count
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
@@ -1,5 +1,5 @@
1
1
  module JSON
2
2
  class SchemaGenerator
3
- VERSION = "0.0.7"
3
+ VERSION = "0.0.8"
4
4
  end
5
5
  end
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.7
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-29 00:00:00.000000000 Z
11
+ date: 2013-12-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jsonpath