Skip to content

Commit f006b13

Browse files
jeff-miller-cfafrantuma
authored andcommitted
Added items to Schema equals and hashcode
Fixed a problem where `Schema` was not using the `items` property in the `equals()` or `hashcode()` method. This appears to have been missed when moving the `items` property off of the `ArraySchema` class and onto the `Schema` class.
1 parent 6480951 commit f006b13

File tree

1 file changed

+3
-2
lines changed
  • modules/swagger-models/src/main/java/io/swagger/v3/oas/models/media

1 file changed

+3
-2
lines changed

modules/swagger-models/src/main/java/io/swagger/v3/oas/models/media/Schema.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1965,7 +1965,8 @@ public boolean equals(java.lang.Object o) {
19651965
Objects.equals(this.dependentSchemas, schema.dependentSchemas) &&
19661966
Objects.equals(this.$comment, schema.$comment) &&
19671967
Objects.equals(this.examples, schema.examples) &&
1968-
Objects.equals(this.prefixItems, schema.prefixItems)
1968+
Objects.equals(this.prefixItems, schema.prefixItems) &&
1969+
Objects.equals(this.items, schema.items)
19691970

19701971
;
19711972
}
@@ -1979,7 +1980,7 @@ public int hashCode() {
19791980
discriminator, _enum, _default, patternProperties, $id, $anchor, $schema, types, allOf, anyOf, oneOf, _const,
19801981
contentEncoding, contentMediaType, contentSchema, propertyNames, unevaluatedProperties, maxContains,
19811982
minContains, additionalItems, unevaluatedItems, _if, _else, then, dependentRequired, dependentSchemas,
1982-
$comment, examples, prefixItems);
1983+
$comment, examples, prefixItems, items);
19831984
}
19841985

19851986
public java.util.Map<String, Object> getExtensions() {

0 commit comments

Comments
 (0)