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 +4 -4
- data/lib/gwtools/generate/swift.rb +3 -3
- data/lib/gwtools/version.rb +1 -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: 815b48333cc7b62c19b09a7b974d11f4da0a06af2223242df93d41e1f94a45dd
|
4
|
+
data.tar.gz: d05b35e6e038c5ed00a44b167936550fede33a58bdc14d4fe9d75b080e62ad33
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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,
|
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
|
-
|
218
|
+
responseJson[root_path].is_a?(Array),
|
219
219
|
readme
|
220
220
|
)
|
221
221
|
|
data/lib/gwtools/version.rb
CHANGED