|
11 | 11 | import org.openapitools.openapidiff.core.model.schema.ChangedEnum;
|
12 | 12 | import org.openapitools.openapidiff.core.model.schema.ChangedMaxItems;
|
13 | 13 | import org.openapitools.openapidiff.core.model.schema.ChangedMaxLength;
|
| 14 | +import org.openapitools.openapidiff.core.model.schema.ChangedMaxProperties; |
14 | 15 | import org.openapitools.openapidiff.core.model.schema.ChangedMinItems;
|
| 16 | +import org.openapitools.openapidiff.core.model.schema.ChangedMinProperties; |
15 | 17 | import org.openapitools.openapidiff.core.model.schema.ChangedMultipleOf;
|
16 | 18 | import org.openapitools.openapidiff.core.model.schema.ChangedNullable;
|
17 | 19 | import org.openapitools.openapidiff.core.model.schema.ChangedNumericRange;
|
@@ -45,6 +47,8 @@ public class ChangedSchema implements ComposedChanged {
|
45 | 47 | protected ChangedMultipleOf multipleOf;
|
46 | 48 | protected ChangedMaxItems maxItems;
|
47 | 49 | protected ChangedMinItems minItems;
|
| 50 | + protected ChangedMaxProperties maxProperties; |
| 51 | + protected ChangedMinProperties minProperties; |
48 | 52 | protected ChangedNullable nullable;
|
49 | 53 | protected boolean discriminatorPropertyChanged;
|
50 | 54 | protected ChangedSchema items;
|
@@ -131,6 +135,8 @@ public List<Changed> getChangedElements() {
|
131 | 135 | multipleOf,
|
132 | 136 | maxItems,
|
133 | 137 | minItems,
|
| 138 | + maxProperties, |
| 139 | + minProperties, |
134 | 140 | nullable,
|
135 | 141 | extensions))
|
136 | 142 | .collect(Collectors.toList());
|
@@ -327,6 +333,14 @@ public ChangedExtensions getExtensions() {
|
327 | 333 | return this.extensions;
|
328 | 334 | }
|
329 | 335 |
|
| 336 | + public ChangedMaxProperties getMaxProperties() { |
| 337 | + return this.maxProperties; |
| 338 | + } |
| 339 | + |
| 340 | + public ChangedMinProperties getMinProperties() { |
| 341 | + return this.minProperties; |
| 342 | + } |
| 343 | + |
330 | 344 | public ChangedSchema setContext(final DiffContext context) {
|
331 | 345 | this.context = context;
|
332 | 346 | return this;
|
@@ -503,6 +517,18 @@ public ChangedSchema setExtensions(final ChangedExtensions extensions) {
|
503 | 517 | return this;
|
504 | 518 | }
|
505 | 519 |
|
| 520 | + public ChangedSchema setMaxProperties(final ChangedMaxProperties maxProperties) { |
| 521 | + clearChangedCache(); |
| 522 | + this.maxProperties = maxProperties; |
| 523 | + return this; |
| 524 | + } |
| 525 | + |
| 526 | + public ChangedSchema setMinProperties(final ChangedMinProperties minProperties) { |
| 527 | + clearChangedCache(); |
| 528 | + this.minProperties = minProperties; |
| 529 | + return this; |
| 530 | + } |
| 531 | + |
506 | 532 | @Override
|
507 | 533 | public boolean equals(Object o) {
|
508 | 534 | if (this == o) return true;
|
@@ -537,7 +563,9 @@ public boolean equals(Object o) {
|
537 | 563 | && Objects.equals(items, that.items)
|
538 | 564 | && Objects.equals(oneOfSchema, that.oneOfSchema)
|
539 | 565 | && Objects.equals(addProp, that.addProp)
|
540 |
| - && Objects.equals(extensions, that.extensions); |
| 566 | + && Objects.equals(extensions, that.extensions) |
| 567 | + && Objects.equals(maxProperties, that.maxProperties) |
| 568 | + && Objects.equals(minProperties, that.minProperties); |
541 | 569 | }
|
542 | 570 |
|
543 | 571 | @Override
|
@@ -572,7 +600,9 @@ public int hashCode() {
|
572 | 600 | items,
|
573 | 601 | oneOfSchema,
|
574 | 602 | addProp,
|
575 |
| - extensions); |
| 603 | + extensions, |
| 604 | + maxProperties, |
| 605 | + minProperties); |
576 | 606 | }
|
577 | 607 |
|
578 | 608 | @java.lang.Override
|
@@ -637,6 +667,10 @@ public java.lang.String toString() {
|
637 | 667 | + this.getAddProp()
|
638 | 668 | + ", extensions="
|
639 | 669 | + this.getExtensions()
|
| 670 | + + ", maxProperties=" |
| 671 | + + this.getMaxProperties() |
| 672 | + + ", minProperties=" |
| 673 | + + this.getMinProperties() |
640 | 674 | + ")";
|
641 | 675 | }
|
642 | 676 | }
|
0 commit comments