Skip to content

Commit b01b6ad

Browse files
authored
Merge pull request #9204 from swagger-api/codegen_response_obj_update
codegen response object update
2 parents 40026e6 + 65a5648 commit b01b6ad

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

modules/swagger-codegen/src/main/java/io/swagger/codegen/v3/CodegenResponse.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
public class CodegenResponse extends CodegenObject {
88
public final List<CodegenProperty> headers = new ArrayList<CodegenProperty>();
99
public String code, message;
10+
public List<CodegenContent> contents = new ArrayList<>();
1011
public List<Map<String, Object>> examples;
1112
public String dataType, baseType, containerType;
1213
public Object schema;
@@ -54,6 +55,8 @@ public boolean equals(Object o) {
5455
return false;
5556
if (vendorExtensions != null ? !vendorExtensions.equals(that.vendorExtensions) : that.vendorExtensions != null)
5657
return false;
58+
if (contents != null ? !contents.equals(that.contents) : that.contents != null)
59+
return false;
5760
return jsonSchema != null ? jsonSchema.equals(that.jsonSchema) : that.jsonSchema == null;
5861
}
5962

@@ -69,6 +72,7 @@ public int hashCode() {
6972
result = 31 * result + (schema != null ? schema.hashCode() : 0);
7073
result = 31 * result + (jsonSchema != null ? jsonSchema.hashCode() : 0);
7174
result = 31 * result + (vendorExtensions != null ? vendorExtensions.hashCode() : 0);
75+
result = 31 * result + (contents != null ? contents.hashCode() : 0);
7276
return result;
7377
}
7478

@@ -107,4 +111,8 @@ public Object getSchema() {
107111
public String getJsonSchema() {
108112
return jsonSchema;
109113
}
114+
115+
public List<CodegenContent> getContents() {
116+
return contents;
117+
}
110118
}

0 commit comments

Comments
 (0)