json_schemer 0.2.12 → 0.2.13

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6d07c36d5981512e6980d79a12084d309b92db45490d3ea821d02713c71fd5fc
4
- data.tar.gz: 20dad8f563ba3ca0dcb7586641cf804aea2f727ed4def911fb105fd7bb14965f
3
+ metadata.gz: e21ec6fd7dcbc28003dfab561b6bf370703ff602abc3b31fa579f5898e5934c6
4
+ data.tar.gz: 89ca6ea9b2400fcaafc3eae438077af0cc881f19bd40646c8bc74c3772bcae89
5
5
  SHA512:
6
- metadata.gz: 199c651105b1330a6946d7099d9c9c0d4f74d1922e03cf3855870660f32c81fb6f94d3748555d17cde6fb56b5b2029388099f7bf977f5585df8ec7dd5da726b5
7
- data.tar.gz: e2acf5a285a724dc1c5c99fe35e081ab30f934554aa2f02c691926d75f3ac681594c015ef9224b7d2f70be98dd8d39404f8e4b0c3c87285f23314b523111d20e
6
+ metadata.gz: b12e2e504bd9222f9f86a5f54d7e2c9a0cc9d323d49d9d3b3f11161fdfefb86ce1080c62bf07b0de462d28bced42276bb6faaa3943c2ce1faee1d3f61e8f3c1f
7
+ data.tar.gz: f3157b1e89c4eb89cc9727cd93087b518d78ae05fc46c0fe8f6ddc81815dee55d6fa576b5b46bd112479466d134ec0b24a2f75f58e6f80073435600ce796edd9
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- json_schemer (0.2.12)
4
+ json_schemer (0.2.13)
5
5
  ecma-re-validator (~> 0.2)
6
6
  hana (~> 1.3)
7
7
  regexp_parser (~> 1.5)
@@ -615,16 +615,15 @@ module JSONSchemer
615
615
  if schema.is_a?(Array)
616
616
  schema.each_with_index { |subschema, index| resolve_ids(subschema, ids, parent_uri, "#{pointer}/#{index}") }
617
617
  elsif schema.is_a?(Hash)
618
- id = schema[id_keyword]
619
- uri = join_uri(parent_uri, id)
620
- unless uri == parent_uri
621
- ids[uri.to_s] = {
622
- schema: schema,
623
- pointer: pointer
624
- }
625
- end
626
- if definitions = schema['definitions']
627
- definitions.each { |key, subschema| resolve_ids(subschema, ids, uri, "#{pointer}/definitions/#{key}") }
618
+ uri = join_uri(parent_uri, schema[id_keyword])
619
+ schema.each do |key, value|
620
+ if key == id_keyword && uri != parent_uri
621
+ ids[uri.to_s] = {
622
+ schema: schema,
623
+ pointer: pointer
624
+ }
625
+ end
626
+ resolve_ids(value, ids, uri, "#{pointer}/#{key}")
628
627
  end
629
628
  end
630
629
  ids
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module JSONSchemer
3
- VERSION = '0.2.12'
3
+ VERSION = '0.2.13'
4
4
  end
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.12
4
+ version: 0.2.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Harsha
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-07-12 00:00:00.000000000 Z
11
+ date: 2020-08-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler