oas_parser 0.4.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/lib/oas_parser/response_parser.rb +13 -0
- data/lib/oas_parser/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: 57b6b26e97b0ef596736fc476809afc6d4e0be0c
|
4
|
+
data.tar.gz: ec63e70f8eab67fe2f0b610ce18289b159221a5b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: add2add151ef95fd604946cb59f9607ef0cbcf2c639e30257e40f68c8d87a58e2778ef3b4dde2dfa664dabbbb6df412ff01d0e1987222ef05c2173a7fc10a3cf
|
7
|
+
data.tar.gz: f3aa81e29ce4e00e4091da1a2f558cbef811c39ec7fc00295ecd576a4c489b7817501adea1c6b1f9246f8978d2faca0ec01a1ea4a2ad5be6f745cba420669955
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
oas_parser (0.
|
4
|
+
oas_parser (0.5.0)
|
5
5
|
activesupport (~> 5.1.2)
|
6
6
|
addressable (~> 2.3)
|
7
7
|
builder (~> 3.2.3)
|
@@ -53,7 +53,7 @@ GEM
|
|
53
53
|
lumberjack (1.0.12)
|
54
54
|
method_source (0.9.0)
|
55
55
|
mini_portile2 (2.3.0)
|
56
|
-
minitest (5.11.
|
56
|
+
minitest (5.11.3)
|
57
57
|
nenv (0.3.0)
|
58
58
|
nokogiri (1.8.1)
|
59
59
|
mini_portile2 (~> 2.3.0)
|
@@ -89,6 +89,10 @@ module OasParser
|
|
89
89
|
if is_xml_text?(value)
|
90
90
|
o['__text'] = parameter_value(value)
|
91
91
|
end
|
92
|
+
|
93
|
+
if has_xml_name?(value)
|
94
|
+
key = xml_name(value)
|
95
|
+
end
|
92
96
|
end
|
93
97
|
|
94
98
|
o[key] = parameter_value(value)
|
@@ -163,5 +167,14 @@ module OasParser
|
|
163
167
|
return true if object['xml']['text'] || false
|
164
168
|
object['xml']['x-text'] || false
|
165
169
|
end
|
170
|
+
|
171
|
+
def has_xml_name?(object)
|
172
|
+
return false unless has_xml_options?(object)
|
173
|
+
xml_name(object) || false
|
174
|
+
end
|
175
|
+
|
176
|
+
def xml_name(object)
|
177
|
+
object['xml']['name']
|
178
|
+
end
|
166
179
|
end
|
167
180
|
end
|
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.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Butler
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-01-
|
11
|
+
date: 2018-01-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|