mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-07-03 22:20:56 +00:00
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:
commit
963d92e23f
@ -6,6 +6,7 @@ public class CodegenResponse {
|
|||||||
public String code, message;
|
public String code, message;
|
||||||
public Boolean hasMore;
|
public Boolean hasMore;
|
||||||
public List<Map<String, String>> examples;
|
public List<Map<String, String>> examples;
|
||||||
|
public final List<CodegenProperty> headers = new ArrayList<CodegenProperty>();
|
||||||
public String dataType, baseType, containerType;
|
public String dataType, baseType, containerType;
|
||||||
public Boolean simpleType;
|
public Boolean simpleType;
|
||||||
public Boolean primitiveType;
|
public Boolean primitiveType;
|
||||||
|
@ -765,6 +765,7 @@ public class DefaultCodegen {
|
|||||||
r.schema = response.getSchema();
|
r.schema = response.getSchema();
|
||||||
r.examples = toExamples(response.getExamples());
|
r.examples = toExamples(response.getExamples());
|
||||||
r.jsonSchema = Json.pretty(response);
|
r.jsonSchema = Json.pretty(response);
|
||||||
|
addHeaders(response, r.headers);
|
||||||
|
|
||||||
if (r.schema != null) {
|
if (r.schema != null) {
|
||||||
Property responseProperty = response.getSchema();
|
Property responseProperty = response.getSchema();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user