Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 5a54a6a

Browse files
authoredJul 25, 2023
Improve backward-compatibility testing (#546)
- Attempts to be exhaustive on backward-compatibility coverage to raise confidence that future refactors will not introduce unintended regressions. - Each incompatible condition is tested separately by comparing two spec files where the only difference is that fine-grained incompatible condition. - In some cases the current behavior appears incorrect. Tests are still added for these to avoid unintended regression, but are given TODO comments for later follow-up. - Pre-existing tests have been removed if they are redundant to avoid confusion and to follow the convention. Closes #545
1 parent c0fa0fe commit 5a54a6a

File tree

142 files changed

+5407
-829
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

142 files changed

+5407
-829
lines changed
 

‎core/src/main/java/org/openapitools/openapidiff/core/model/ChangedSecurityScheme.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,13 @@ public DiffResult isCoreChanged() {
4444
&& !changedBearerFormat
4545
&& !changedOpenIdConnectUrl
4646
&& (changedScopes == null || changedScopes.getIncreased().isEmpty())) {
47+
48+
// TODO: Dead code removal opportunity for changedType and changedIn. It appears that
49+
// SecuritySchemaDiff will never be given the chance to detect differences TYPE and
50+
// IN differences because that case has already been detected and filtered out by
51+
// SecurityRequirementsDiff and recorded as a dropped requirement in
52+
// ChangedSecurityRequirements.
53+
4754
return DiffResult.COMPATIBLE;
4855
}
4956
return DiffResult.INCOMPATIBLE;

‎core/src/test/java/org/openapitools/openapidiff/core/BackwardCompatibilityTest.java

Lines changed: 0 additions & 49 deletions
This file was deleted.

0 commit comments

Comments
 (0)
Please sign in to comment.