|
9 | 9 | import java.util.stream.Collectors;
|
10 | 10 | import java.util.stream.Stream;
|
11 | 11 | import org.openapitools.openapidiff.core.model.schema.ChangedEnum;
|
| 12 | +import org.openapitools.openapidiff.core.model.schema.ChangedMaxItems; |
12 | 13 | import org.openapitools.openapidiff.core.model.schema.ChangedMaxLength;
|
| 14 | +import org.openapitools.openapidiff.core.model.schema.ChangedMinItems; |
13 | 15 | import org.openapitools.openapidiff.core.model.schema.ChangedMultipleOf;
|
14 | 16 | import org.openapitools.openapidiff.core.model.schema.ChangedNullable;
|
15 | 17 | import org.openapitools.openapidiff.core.model.schema.ChangedNumericRange;
|
@@ -41,6 +43,8 @@ public class ChangedSchema implements ComposedChanged {
|
41 | 43 | protected ChangedMaxLength maxLength;
|
42 | 44 | protected ChangedNumericRange numericRange;
|
43 | 45 | protected ChangedMultipleOf multipleOf;
|
| 46 | + protected ChangedMaxItems maxItems; |
| 47 | + protected ChangedMinItems minItems; |
44 | 48 | protected ChangedNullable nullable;
|
45 | 49 | protected boolean discriminatorPropertyChanged;
|
46 | 50 | protected ChangedSchema items;
|
@@ -125,6 +129,8 @@ public List<Changed> getChangedElements() {
|
125 | 129 | maxLength,
|
126 | 130 | numericRange,
|
127 | 131 | multipleOf,
|
| 132 | + maxItems, |
| 133 | + minItems, |
128 | 134 | nullable,
|
129 | 135 | extensions))
|
130 | 136 | .collect(Collectors.toList());
|
@@ -289,6 +295,14 @@ public ChangedMultipleOf getMultipleOf() {
|
289 | 295 | return this.multipleOf;
|
290 | 296 | }
|
291 | 297 |
|
| 298 | + public ChangedMaxItems getMaxItems() { |
| 299 | + return this.maxItems; |
| 300 | + } |
| 301 | + |
| 302 | + public ChangedMinItems getMinItems() { |
| 303 | + return this.minItems; |
| 304 | + } |
| 305 | + |
292 | 306 | public ChangedNullable getNullable() {
|
293 | 307 | return this.nullable;
|
294 | 308 | }
|
@@ -441,6 +455,18 @@ public ChangedSchema setMultipleOf(final ChangedMultipleOf multipleOf) {
|
441 | 455 | return this;
|
442 | 456 | }
|
443 | 457 |
|
| 458 | + public ChangedSchema setMaxItems(final ChangedMaxItems maxItems) { |
| 459 | + clearChangedCache(); |
| 460 | + this.maxItems = maxItems; |
| 461 | + return this; |
| 462 | + } |
| 463 | + |
| 464 | + public ChangedSchema setMinItems(final ChangedMinItems minItems) { |
| 465 | + clearChangedCache(); |
| 466 | + this.minItems = minItems; |
| 467 | + return this; |
| 468 | + } |
| 469 | + |
444 | 470 | public ChangedSchema setNullable(final ChangedNullable nullable) {
|
445 | 471 | clearChangedCache();
|
446 | 472 | this.nullable = nullable;
|
@@ -505,6 +531,8 @@ public boolean equals(Object o) {
|
505 | 531 | && Objects.equals(maxLength, that.maxLength)
|
506 | 532 | && Objects.equals(numericRange, that.numericRange)
|
507 | 533 | && Objects.equals(multipleOf, that.multipleOf)
|
| 534 | + && Objects.equals(maxItems, that.maxItems) |
| 535 | + && Objects.equals(minItems, that.minItems) |
508 | 536 | && Objects.equals(nullable, that.nullable)
|
509 | 537 | && Objects.equals(items, that.items)
|
510 | 538 | && Objects.equals(oneOfSchema, that.oneOfSchema)
|
@@ -537,6 +565,8 @@ public int hashCode() {
|
537 | 565 | maxLength,
|
538 | 566 | numericRange,
|
539 | 567 | multipleOf,
|
| 568 | + maxItems, |
| 569 | + minItems, |
540 | 570 | nullable,
|
541 | 571 | discriminatorPropertyChanged,
|
542 | 572 | items,
|
@@ -591,6 +621,10 @@ public java.lang.String toString() {
|
591 | 621 | + this.getNumericRange()
|
592 | 622 | + ", multipleOf="
|
593 | 623 | + this.getMultipleOf()
|
| 624 | + + ", maxItems=" |
| 625 | + + this.getMaxItems() |
| 626 | + + ", minItems=" |
| 627 | + + this.getMinItems() |
594 | 628 | + ", nullable="
|
595 | 629 | + this.getNullable()
|
596 | 630 | + ", discriminatorPropertyChanged="
|
|
0 commit comments