open_api_import 0.2.1 → 0.2.2
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 +4 -4
- data/lib/open_api_import.rb +4 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6272d1b18625fd79a6bce972cc8f5d59a9f227887a9f49bd75428b00ce8ead31
|
|
4
|
+
data.tar.gz: 2df97329435c449358524f6df94c0fcfb396a01907bf5956e39978b26d9db509
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c26f0ddd02df9ebca565c2f3988e5bd76c4323669dfa1dd5c329b1eb697cf251ff4026a25e9955820d2680f7490c6084bffe04bd311e46963fcdfb1de1e0fbdf
|
|
7
|
+
data.tar.gz: e40ff5eff7f1755369c0bf83e0072c7e2c335b6ef4efa443ff539c57a5c231562a412be0a2bb18f29150f03c03edfa4c315aa4b5d90c9489397b4577d5a90d04
|
data/lib/open_api_import.rb
CHANGED
|
@@ -179,6 +179,7 @@ class OpenApiImport
|
|
|
179
179
|
end
|
|
180
180
|
|
|
181
181
|
mock_example = []
|
|
182
|
+
|
|
182
183
|
if include_responses && cont.key?(:responses) && cont[:responses].is_a?(Hash)
|
|
183
184
|
cont[:responses].each do |k, v|
|
|
184
185
|
response_example = []
|
|
@@ -474,6 +475,9 @@ class OpenApiImport
|
|
|
474
475
|
example = []
|
|
475
476
|
example << "{" unless properties.empty?
|
|
476
477
|
properties.each do |prop, val|
|
|
478
|
+
if val.key?(:properties) and !val.key?(:example) and !val.key?(:type)
|
|
479
|
+
val[:type]='object'
|
|
480
|
+
end
|
|
477
481
|
if val.key?(:example)
|
|
478
482
|
example << if val[:example].is_a?(String)
|
|
479
483
|
" #{prop.to_sym}: \"#{val[:example]}\", "
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: open_api_import
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Mario Ruiz
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2019-02-
|
|
11
|
+
date: 2019-02-05 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: oas_parser
|