swagger-codegen
swagger-codegen copied to clipboard
[PHP] Incorrect return types if multiple responses are defined
Description
If you define multiple responses, the codegen will only support the first one (typically 200).
Swagger-codegen version
2.3
Swagger declaration file content or url
/path
post:
responses:
200:
schema:
$ref: '#/definitions/EmptyResponse'
202:
schema:
$ref: '#/definitions/InBackgroundResponse'
Suggest a fix/enhancement
Correctly generate the return-object based on the HTTP Status Code in the Response. Also fix ReturnType info in DocBlock