From f006b13442e5ddbf56d025fbe394a226cffb3165 Mon Sep 17 00:00:00 2001 From: Jeff Miller Date: Wed, 25 May 2022 10:44:58 -0400 Subject: [PATCH] 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. --- .../src/main/java/io/swagger/v3/oas/models/media/Schema.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/swagger-models/src/main/java/io/swagger/v3/oas/models/media/Schema.java b/modules/swagger-models/src/main/java/io/swagger/v3/oas/models/media/Schema.java index 08e79a56f3..ccb3765045 100644 --- a/modules/swagger-models/src/main/java/io/swagger/v3/oas/models/media/Schema.java +++ b/modules/swagger-models/src/main/java/io/swagger/v3/oas/models/media/Schema.java @@ -1965,7 +1965,8 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.dependentSchemas, schema.dependentSchemas) && Objects.equals(this.$comment, schema.$comment) && Objects.equals(this.examples, schema.examples) && - Objects.equals(this.prefixItems, schema.prefixItems) + Objects.equals(this.prefixItems, schema.prefixItems) && + Objects.equals(this.items, schema.items) ; } @@ -1979,7 +1980,7 @@ public int hashCode() { discriminator, _enum, _default, patternProperties, $id, $anchor, $schema, types, allOf, anyOf, oneOf, _const, contentEncoding, contentMediaType, contentSchema, propertyNames, unevaluatedProperties, maxContains, minContains, additionalItems, unevaluatedItems, _if, _else, then, dependentRequired, dependentSchemas, - $comment, examples, prefixItems); + $comment, examples, prefixItems, items); } public java.util.Map getExtensions() {