swagger-api/swagger-codegen

Empty response body handling in typescript-angular2

開放

#4,962 建立於 2017年3月7日

 (24 則留言) (4 個反應) (0 位負責人)HTML (5,474 個分叉)batch import
Client: TypeScriptIssue: Bughelp wanted

倉庫指標

星標
 (12,701 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

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() || {};

貢獻者指南