|
11 | 11 | import org.openapitools.openapidiff.core.model.schema.ChangedEnum; |
12 | 12 | import org.openapitools.openapidiff.core.model.schema.ChangedMaxLength; |
13 | 13 | import org.openapitools.openapidiff.core.model.schema.ChangedMultipleOf; |
| 14 | +import org.openapitools.openapidiff.core.model.schema.ChangedNullable; |
14 | 15 | import org.openapitools.openapidiff.core.model.schema.ChangedNumericRange; |
| 16 | +import org.openapitools.openapidiff.core.model.schema.ChangedOneOfSchema; |
15 | 17 | import org.openapitools.openapidiff.core.model.schema.ChangedReadOnly; |
16 | 18 | import org.openapitools.openapidiff.core.model.schema.ChangedRequired; |
17 | 19 | import org.openapitools.openapidiff.core.model.schema.ChangedWriteOnly; |
@@ -39,6 +41,7 @@ public class ChangedSchema implements ComposedChanged { |
39 | 41 | protected ChangedMaxLength maxLength; |
40 | 42 | protected ChangedNumericRange numericRange; |
41 | 43 | protected ChangedMultipleOf multipleOf; |
| 44 | + protected ChangedNullable nullable; |
42 | 45 | protected boolean discriminatorPropertyChanged; |
43 | 46 | protected ChangedSchema items; |
44 | 47 | protected ChangedOneOfSchema oneOfSchema; |
@@ -122,6 +125,7 @@ public List<Changed> getChangedElements() { |
122 | 125 | maxLength, |
123 | 126 | numericRange, |
124 | 127 | multipleOf, |
| 128 | + nullable, |
125 | 129 | extensions)) |
126 | 130 | .collect(Collectors.toList()); |
127 | 131 | } |
@@ -285,6 +289,10 @@ public ChangedMultipleOf getMultipleOf() { |
285 | 289 | return this.multipleOf; |
286 | 290 | } |
287 | 291 |
|
| 292 | + public ChangedNullable getNullable() { |
| 293 | + return this.nullable; |
| 294 | + } |
| 295 | + |
288 | 296 | public boolean isDiscriminatorPropertyChanged() { |
289 | 297 | return this.discriminatorPropertyChanged; |
290 | 298 | } |
@@ -433,6 +441,12 @@ public ChangedSchema setMultipleOf(final ChangedMultipleOf multipleOf) { |
433 | 441 | return this; |
434 | 442 | } |
435 | 443 |
|
| 444 | + public ChangedSchema setNullable(final ChangedNullable nullable) { |
| 445 | + clearChangedCache(); |
| 446 | + this.nullable = nullable; |
| 447 | + return this; |
| 448 | + } |
| 449 | + |
436 | 450 | public ChangedSchema setDiscriminatorPropertyChanged(final boolean discriminatorPropertyChanged) { |
437 | 451 | clearChangedCache(); |
438 | 452 | this.discriminatorPropertyChanged = discriminatorPropertyChanged; |
@@ -491,6 +505,7 @@ public boolean equals(Object o) { |
491 | 505 | && Objects.equals(maxLength, that.maxLength) |
492 | 506 | && Objects.equals(numericRange, that.numericRange) |
493 | 507 | && Objects.equals(multipleOf, that.multipleOf) |
| 508 | + && Objects.equals(nullable, that.nullable) |
494 | 509 | && Objects.equals(items, that.items) |
495 | 510 | && Objects.equals(oneOfSchema, that.oneOfSchema) |
496 | 511 | && Objects.equals(addProp, that.addProp) |
@@ -522,6 +537,7 @@ public int hashCode() { |
522 | 537 | maxLength, |
523 | 538 | numericRange, |
524 | 539 | multipleOf, |
| 540 | + nullable, |
525 | 541 | discriminatorPropertyChanged, |
526 | 542 | items, |
527 | 543 | oneOfSchema, |
@@ -575,6 +591,8 @@ public java.lang.String toString() { |
575 | 591 | + this.getNumericRange() |
576 | 592 | + ", multipleOf=" |
577 | 593 | + this.getMultipleOf() |
| 594 | + + ", nullable=" |
| 595 | + + this.getNullable() |
578 | 596 | + ", discriminatorPropertyChanged=" |
579 | 597 | + this.isDiscriminatorPropertyChanged() |
580 | 598 | + ", items=" |
|
0 commit comments