Merge pull request #518 from cchafer/add_response_headers

Add defined response headers in CodegenResponse. at this time, only the ...
This commit is contained in:
Tony Tam 2015-03-18 14:10:08 -07:00
commit 963d92e23f
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 final List<CodegenProperty> headers = new ArrayList<CodegenProperty>();
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();