open_api_import 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/open_api_import.rb +12 -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: 1a8f63ba6acbf1d3734f2e0e3b6df8edec9030a5ede1e14414dad974a1c3fab3
|
4
|
+
data.tar.gz: e4ef52b2d0f5cd2830951b8b1ffdf9843b2140c8b8da518bfbcdb5f345f7bb62
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5a35275273edc44be3dad32e73b90e0cf09d37612b91ac81a05e1c5be99f2d62ee1ff94f14861c9ab095ed44a2b6af48bf687a48f0ef126cf583bed17aab22d6
|
7
|
+
data.tar.gz: 9546b16e8f880e8b2678e591b917b593e2c69f2281dc540621e64c9b7222ec22b61a5d9345338390b7f1f39056d5263e181c4c8d62c6a9ee9d0ba5d70052ff24
|
data/lib/open_api_import.rb
CHANGED
@@ -311,6 +311,18 @@ class OpenApiImport
|
|
311
311
|
output << description_parameters
|
312
312
|
end
|
313
313
|
|
314
|
+
#for the case we still have some parameters on path that were not in 'parameters'
|
315
|
+
if path_txt.scan(/[^#]{\w+}/).size > 0
|
316
|
+
paramst = []
|
317
|
+
prms = path_txt.scan(/[^#]{(\w+)}/)
|
318
|
+
prms.each do |p|
|
319
|
+
paramst<<p[0].to_s.snake_case
|
320
|
+
path_txt.gsub!("{#{p[0]}}", "\#{#{p[0].to_s.snake_case}}")
|
321
|
+
end
|
322
|
+
paramst.concat params
|
323
|
+
params = paramst
|
324
|
+
end
|
325
|
+
|
314
326
|
output << "def self.#{method_name} (#{params.join(", ")})"
|
315
327
|
|
316
328
|
output << "{"
|
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.
|
4
|
+
version: 0.2.0
|
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-01
|
11
|
+
date: 2019-02-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: oas_parser
|