Fix for #1940 - Show response headers (#4825)

This commit is contained in:
jsone-studios
2017-02-20 09:18:09 +01:00
committed by wing328
parent 23d114e1eb
commit 6746632834
5 changed files with 381 additions and 130 deletions

View File

@@ -10,6 +10,7 @@ public class CodegenResponse {
public boolean hasMore;
public List<Map<String, Object>> examples;
public String dataType, baseType, containerType;
public boolean hasHeaders;
public boolean isString, isInteger, isLong, isFloat, isDouble, isByteArray, isBoolean, isDate, isDateTime;
public boolean isDefault;
public boolean simpleType;

View File

@@ -2231,6 +2231,7 @@ public class DefaultCodegen {
r.jsonSchema = Json.pretty(response);
r.vendorExtensions = response.getVendorExtensions();
addHeaders(response, r.headers);
r.hasHeaders = !r.headers.isEmpty();
if (r.schema != null) {
Property responseProperty = response.getSchema();