forked from loafle/openapi-generator-original
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:
@@ -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;
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user