[swift5] Remove optional from body#10938
Conversation
|
@4brunu |
| let validatedRequest = request.validate() | ||
|
|
||
| switch T.self { | ||
| case is String.Type: |
There was a problem hiding this comment.
When response type is void, getNonDecodableBuilder is used
|
Hi @funzin, thanks for creating this PR. |
|
OK, I will check these places:+1: |
There was a problem hiding this comment.
@funzin please search and replace all occurrences of response.body! with response.body in this class, to fix all the cases. Thanks
There was a problem hiding this comment.
I have already checked response.body! in swift5
dbdc585
Maybe, CI will be succeed.
a1a8d2c to
a802030
Compare
a802030 to
dbdc585
Compare
4brunu
left a comment
There was a problem hiding this comment.
Looks good to me 👍
Thanks for this PR
Remove optional from
bodyWhen using
getNonDecodableBuilder, Response body type isVoidonly so we don't need to havebodyas optional.body: T?tobody: Twe won't have to do any unnecessary unwrapping when using api response.
PR checklist
This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
These must match the expectations made by your contribution.
You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example
./bin/generate-samples.sh bin/configs/java*.For Windows users, please run the script in Git BASH.
master(5.3.0),6.0.x