swagger-codegen icon indicating copy to clipboard operation
swagger-codegen copied to clipboard

Fix Issue 7547

Open craffael opened this issue 7 years ago • 0 comments

PR checklist

  • [x] Read the contribution guidelines.
  • [x] Ran the shell script under ./bin/ to update Petstore sample so that CIs can verify the change. (For instance, only need to run ./bin/{LANG}-petstore.sh and ./bin/security/{LANG}-petstore.sh if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in .\bin\windows\.
  • [x] Filed the PR against the correct branch: 3.0.0 branch for changes related to OpenAPI spec 3.0. Default: master.
  • [x] Copied the technical committee to review the pull request if your PR is targeting a particular programming language. @mandrean @jimschubert

Description of the PR

I've adapted the api.mustache template with an additional "if" statement: If the response is a file response, use Nancy.Response. On top of that, I've refactor the computation of the return type into the returnType.mustache file in order to avoid (existing) code duplication.

craffael avatar Feb 01 '18 14:02 craffael