oas_parser 0.18.0 → 0.18.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/oas_parser/parser.rb +6 -13
- data/lib/oas_parser/version.rb +1 -1
- 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: cf608da9a7c2b6fa14bd6bc2c11f087a20ee378863c126d64962f361c752abbe
|
4
|
+
data.tar.gz: 894cee81f1a47c1a41057a4511bca9bca6cd5a83ce51ac7ef931aed47985ed0a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8984dab1cfa049034c1ef4c149bc3f392dcb7dd7618df32cd145498f0d4a43833e0b8f1bd9f4dffcbd72025a727d42cebf4861f9a28e1ef288d5dafdb57d380c
|
7
|
+
data.tar.gz: 2f8fbf593b4f15b00c8dd74f19a187ddec6af950c24feb2a463e7beff5912c1d4c88d5bae3b8eec5610fdea8c95c1faa62ec8d158b879815200c60709154939c
|
data/Gemfile.lock
CHANGED
data/lib/oas_parser/parser.rb
CHANGED
@@ -49,21 +49,14 @@ module OasParser
|
|
49
49
|
def expand_file(ref)
|
50
50
|
absolute_path = File.expand_path(File.join("..", ref), @path)
|
51
51
|
absolute_path, local_reference = absolute_path.split('#')
|
52
|
-
|
53
|
-
# skip first item in the split array, it is blank
|
54
|
-
local_reference_path = local_reference.split('/')[1..-1]
|
55
|
-
resolved_remote_reference = Parser.resolve(absolute_path)
|
52
|
+
resolved_remote_reference = Parser.resolve(absolute_path)
|
56
53
|
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
# extract the local reference data from the remote remote reference
|
62
|
-
# and include the expanded pointer
|
63
|
-
resolved_remote_reference.dig(*local_reference_path).merge(expanded_pointer)
|
64
|
-
else
|
65
|
-
Parser.resolve(absolute_path)
|
54
|
+
if local_reference
|
55
|
+
pointer = OasParser::Pointer.new(local_reference)
|
56
|
+
return pointer.resolve(resolved_remote_reference)
|
66
57
|
end
|
58
|
+
|
59
|
+
resolved_remote_reference
|
67
60
|
end
|
68
61
|
|
69
62
|
def expand_pointer(ref, content=nil)
|
data/lib/oas_parser/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: oas_parser
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.18.
|
4
|
+
version: 0.18.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Butler
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-04-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|
@@ -249,7 +249,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
249
249
|
version: '0'
|
250
250
|
requirements: []
|
251
251
|
rubyforge_project:
|
252
|
-
rubygems_version: 2.7.6
|
252
|
+
rubygems_version: 2.7.6.2
|
253
253
|
signing_key:
|
254
254
|
specification_version: 4
|
255
255
|
summary: A parser for Open API specifications
|