|
4 | 4 | import static org.openapitools.openapidiff.core.TestUtils.assertSpecChangedButCompatible; |
5 | 5 | import static org.openapitools.openapidiff.core.TestUtils.assertSpecIncompatible; |
6 | 6 | import static org.openapitools.openapidiff.core.TestUtils.assertSpecUnchanged; |
7 | | -import static org.openapitools.openapidiff.core.model.BackwardIncompatibleProp.RESPONSE_REQUIRED_DECREASED; |
8 | | -import static org.openapitools.openapidiff.core.model.BackwardIncompatibleProp.SCHEMA_DISCRIMINATOR_CHANGED; |
9 | | -import static org.openapitools.openapidiff.core.model.BackwardIncompatibleProp.SCHEMA_PATTERN_CHANGED; |
10 | | -import static org.openapitools.openapidiff.core.model.BackwardIncompatibleProp.SCHEMA_TYPE_CHANGED; |
| 7 | +import static org.openapitools.openapidiff.core.model.BackwardIncompatibleProp.*; |
11 | 8 |
|
12 | 9 | import org.junit.jupiter.api.Test; |
13 | 10 | import org.openapitools.openapidiff.core.model.BackwardIncompatibleProp; |
@@ -76,4 +73,28 @@ public void patternChanged() { |
76 | 73 | BackwardIncompatibleProp prop = SCHEMA_PATTERN_CHANGED; |
77 | 74 | assertSpecIncompatible(BASE, "bc_schema_pattern_changed.yaml", prop); |
78 | 75 | } |
| 76 | + |
| 77 | + @Test |
| 78 | + public void minPropertiesIncreased() { |
| 79 | + BackwardIncompatibleProp prop = SCHEMA_MIN_PROPERTIES_CHANGED; |
| 80 | + assertSpecIncompatible(BASE, "bc_schema_min_properties_increased.yaml", prop); |
| 81 | + } |
| 82 | + |
| 83 | + @Test |
| 84 | + public void minPropertiesAdded() { |
| 85 | + BackwardIncompatibleProp prop = SCHEMA_MIN_PROPERTIES_CHANGED; |
| 86 | + assertSpecIncompatible(BASE, "bc_schema_min_properties_added.yaml", prop); |
| 87 | + } |
| 88 | + |
| 89 | + @Test |
| 90 | + public void maxPropertiesDecreased() { |
| 91 | + BackwardIncompatibleProp prop = SCHEMA_MAX_PROPERTIES_CHANGED; |
| 92 | + assertSpecIncompatible(BASE, "bc_schema_max_properties_decreased.yaml", prop); |
| 93 | + } |
| 94 | + |
| 95 | + @Test |
| 96 | + public void maxPropertiesAdded() { |
| 97 | + BackwardIncompatibleProp prop = SCHEMA_MAX_PROPERTIES_CHANGED; |
| 98 | + assertSpecIncompatible(BASE, "bc_schema_max_properties_added.yaml", prop); |
| 99 | + } |
79 | 100 | } |
0 commit comments