Add defined response headers in CodegenResponse. at this time, only the headers of the 'default' response are included in the operation.

This commit is contained in:
Camille Chafer
2015-03-18 18:29:18 +01:00
parent dd78de1ed8
commit ac78c15fbf
2 changed files with 2 additions and 0 deletions

View File

@@ -6,6 +6,7 @@ public class CodegenResponse {
public String code, message;
public Boolean hasMore;
public List<Map<String, String>> examples;
public List<CodegenProperty> headers;
public String dataType, baseType, containerType;
public Boolean simpleType;
public Boolean primitiveType;

View File

@@ -765,6 +765,7 @@ public class DefaultCodegen {
r.schema = response.getSchema();
r.examples = toExamples(response.getExamples());
r.jsonSchema = Json.pretty(response);
addHeaders(response, r.headers);
if (r.schema != null) {
Property responseProperty = response.getSchema();