Skip to content

Commit 314efb9

Browse files
committed
Fix swift casts
1 parent d51fe5c commit 314efb9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

templates/swift/Sources/Client.swift.twig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ open class Client {
376376
path: path + "/" + (params[idParamName!] as! String),
377377
headers: headers,
378378
params: [:],
379-
converter: { return $0 }
379+
converter: { return $0 as! [String: Any] }
380380
)
381381
let chunksUploaded = map["chunksUploaded"] as! Int
382382
offset = min(size, (chunksUploaded * Client.chunkSize))
@@ -397,7 +397,7 @@ open class Client {
397397
path: path,
398398
headers: headers,
399399
params: params,
400-
converter: { return $0 }
400+
converter: { return $0 as! [String: Any] }
401401
)
402402

403403
offset += Client.chunkSize

templates/swift/Sources/Services/Service.swift.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ open class {{ service.name | caseUcfirst }}: Service {
4747
{% if method.responseModel == 'any' %}
4848
return response
4949
{% else %}
50-
return {{ spec.title | caseUcfirst}}Models.{{method.responseModel | caseUcfirst}}.from(map: response as [String: Any])
50+
return {{ spec.title | caseUcfirst}}Models.{{method.responseModel | caseUcfirst}}.from(map: response as! [String: Any])
5151
{% endif %}
5252
}
5353
{% endif %}

0 commit comments

Comments
 (0)