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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 54cc8e6fb12e53ddc9dfbbafaa1628cdb1059fcfef1eaadaf1457a8ee113eaf9
4
- data.tar.gz: 063253b30a32967fe2a20766885ffb32da17a2b98bc0a86846f55425b7db80b9
3
+ metadata.gz: 4c6bed3da0a9afc4136a9ed5fd605bc9331d1cabecd60dffc687061de701e985
4
+ data.tar.gz: b820d03e4f501e6ec75f5756144b1ab67f35b5fce82914704e1c04122e30b71e
5
5
  SHA512:
6
- metadata.gz: e5923cfe74e6ebd320e3cf9695d8f11186cb5470fabaf301ae57d2ee1fcd129012401332728e60edfed772c3de658f503e1f64c530b2f82d191d4f2afc6324fe
7
- data.tar.gz: 733c15163c84675309f9850f503bc1dffdb251148c9de14ea3e494d5406315e6f743d49d575d71c9df6a1f05d6b2463446fbf91424d11e8ba8e4e6d32e976ca0
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| "#{k}: #{v&.capitalize}" }.join(", ") + "}]"
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: swagger-to-rbs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miguel Savignano