swagger-codegen
swagger-codegen copied to clipboard
[Swift4] 204 No Content returns error
Description
Swift 4 code-gen issue: If a request returns a status code of 204 with no content, the completion handler will return an error and nil response. Since a 204 with no content is expected, no error should be thrown.
Swagger-codegen version
Swagger version 2.3.1
Steps to reproduce
In swagger, create a request that returns a 204 and no content.
Suggest a fix/enhancement
An error should not be thrown.
@wing328 Do you know we have 204 response api definition in petstore.yaml? I also need to use 204 response api. If not, we should add as reference.
@nfortenberry By this PR, we can accept no content as Void response.
Great! Thank you!