Skip to content

Commit 8a460ba

Browse files
committed
add item support in ModelImpl
1 parent 8144616 commit 8a460ba

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

modules/swagger-models/src/main/java/io/swagger/models/ModelImpl.java

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,27 @@ public class ModelImpl extends AbstractModel {
2323
private String description;
2424
private Object example;
2525
private Property additionalProperties;
26+
private Property items;
2627
private String discriminator;
2728
@JsonProperty("default")
2829
private String defaultValue;
2930
private List<String> _enum;
3031
private BigDecimal minimum;
3132
private BigDecimal maximum;
3233

34+
public ModelImpl items(Property items) {
35+
this.setItems(items);
36+
return this;
37+
}
38+
39+
public Property getItems() {
40+
return items;
41+
}
42+
43+
public void setItems(Property items) {
44+
this.items = items;
45+
}
46+
3347
public ModelImpl _enum(List<String> value) {
3448
this._enum = value;
3549
return this;
@@ -297,6 +311,9 @@ public boolean equals(Object o) {
297311
if (additionalProperties != null ? !additionalProperties.equals(model.additionalProperties) : model.additionalProperties != null) {
298312
return false;
299313
}
314+
if (items != null ? !items.equals(model.items) : model.items != null) {
315+
return false;
316+
}
300317
if (discriminator != null ? !discriminator.equals(model.discriminator) : model.discriminator != null) {
301318
return false;
302319
}
@@ -330,6 +347,7 @@ public int hashCode() {
330347
result = 31 * result + (_enum != null ? _enum.hashCode() : 0);
331348
result = 31 * result + (minimum != null ? minimum.hashCode() : 0);
332349
result = 31 * result + (maximum != null ? maximum.hashCode() : 0);
350+
result = 31 * result + (items != null ? items.hashCode() : 0);
333351
return result;
334352
}
335353

@@ -351,6 +369,7 @@ public Object clone() {
351369
cloned.defaultValue = this.defaultValue;
352370
cloned.minimum = this.minimum;
353371
cloned.maximum = this.maximum;
372+
cloned.items = this.items;
354373

355374
return cloned;
356375
}

0 commit comments

Comments
 (0)