gwtools 0.0.15 → 0.0.16

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d9008f2c63bf9819bb028d56605f9f971c9f75e27865a54faae2115d8b1c384f
4
- data.tar.gz: cd71025cf2a99576b58686ae67469de00086b571516ca574f3639f7485e5675a
3
+ metadata.gz: 815b48333cc7b62c19b09a7b974d11f4da0a06af2223242df93d41e1f94a45dd
4
+ data.tar.gz: d05b35e6e038c5ed00a44b167936550fede33a58bdc14d4fe9d75b080e62ad33
5
5
  SHA512:
6
- metadata.gz: a55cdc1621a3c012d7d40922078af8080ceff67b43f0f9007d08b6f21c4cd473247a071d3d776c0a45d9eafa4c9d9bf68e464734aac6135d3de0167ab00a4068
7
- data.tar.gz: 68fd58663f5eecc0a587dcfb80cb62a287b31e51d81262fc8c210584a00aa23e05f237bc695ba1fcc4d5966877f15cfe0118ac0eea76a0c78cb21b3367a63ae1
6
+ metadata.gz: d4c9a8f1ba05cf7a3003f4c6c00d599a978f761953350423baab24b364b0e5c82ab9902fe37297b1a65a0f7983267d6195702b3413917e176758d22c47d4a823
7
+ data.tar.gz: b519de2f870e800d5a33444e0579bc2a40bfe29536fcdc4bee4b68b41c5c9a86d61e568e6743dcb169ff675d576ba5f581057adbc621bf5f3d0c061ea97e38cf
@@ -154,8 +154,8 @@ public extension <%="#{@api_name}"%> {
154
154
  body,
155
155
  responseJson)
156
156
  app_name = dirs.join('.')
157
-
158
- swift_model = generate_model("#{httpMethod.capitalize.chomp}Model", responseJson, 'data')
157
+ root_path = 'data' # 这里只关心 data 下的数据
158
+ swift_model = generate_model("#{httpMethod.capitalize.chomp}Model", responseJson, root_path)
159
159
  prefixPath = getPrefixPath(path)
160
160
  prefixPath = getPrefixPath(path)
161
161
 
@@ -215,7 +215,7 @@ extension <##SomeViewModel##> {
215
215
  detailPath,
216
216
  "#{httpMethod.capitalize.chomp}Model",
217
217
  swift_model,
218
- false,
218
+ responseJson[root_path].is_a?(Array),
219
219
  readme
220
220
  )
221
221
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Gwtools
4
- VERSION = "0.0.15"
4
+ VERSION = "0.0.16"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gwtools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.15
4
+ version: 0.0.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - chenglq