swagger-to-rbs 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/swagger2_rbs/rest_endpoint.rb +3 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4c6bed3da0a9afc4136a9ed5fd605bc9331d1cabecd60dffc687061de701e985
|
4
|
+
data.tar.gz: b820d03e4f501e6ec75f5756144b1ab67f35b5fce82914704e1c04122e30b71e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0b405ea2f717d6a2a7a5473dc092b3163c0a7305849d4730d9c0d69e8aa7ebecef3915b0d517f730f141900004ba8dd5124223d606ddac609f807d305fdd9ade
|
7
|
+
data.tar.gz: 0c38554cbb91292be48311a8ee0e7de88663ef1c0de7e432e08525b9ce2fb308ca302482025ec68fe117231b7cc0aad0859a43d2da17f8b3ac9f2a27ad335703
|
@@ -22,6 +22,8 @@ module Swagger2Rbs
|
|
22
22
|
body_typed: body_typed,
|
23
23
|
response_typed: response_typed,
|
24
24
|
}
|
25
|
+
rescue => e
|
26
|
+
raise e, "Context: #{path} #{method} Message: #{e.message}"
|
25
27
|
end
|
26
28
|
|
27
29
|
def method_name
|
@@ -64,7 +66,7 @@ module Swagger2Rbs
|
|
64
66
|
return "#{k}: {#{v.map{ |k2, v2| to_typed(k2, v2) }.join(", ")}}" if v.is_a?(Hash)
|
65
67
|
|
66
68
|
if v[0]&.is_a?(Hash)
|
67
|
-
"#{k}: Array[{" + v[0].map{ |k, v|
|
69
|
+
"#{k}: Array[{" + v[0].map{ |k, v| to_typed(k, v) }.join(", ") + "}]"
|
68
70
|
else
|
69
71
|
"#{k}: Array[#{v[0]&.capitalize}]"
|
70
72
|
end
|