swagger-api/swagger-codegen

Empty response body handling in typescript-angular2

Open

#4 962 ouverte le 7 mars 2017

Voir sur GitHub
 (24 commentaires) (4 réactions) (0 assignés)HTML (5 474 forks)batch import
Client: TypeScriptIssue: Bughelp wanted

Métriques du dépôt

Stars
 (12 701 stars)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

Description

Description

Empty response 200 OK codes are not handled by auto generated api code.

Swagger-codegen version

2.2.2

Swagger declaration file content or url
Command line used for generation

language: typescript-angular2

Steps to reproduce

Build an api response just give 200 as http code but no response body

Suggest a Fix

Here's the current api.mustache at line 45;

return response.json()

It should be;

return response.json() || {};

Guide contributeur