Open Ulashlo opened 1 month ago
Under certain conditions, breaking change is not detected:
Schema old.json: old.json
Schema new.json: new.json
The difference:
TestResult
resultType
testResultType
test
Expected results: 3 changes, one breaking change:
Actual result:
openapi-changes report ./old.json ./new.json { "reportSummary": { "components": { "totalChanges": 2, "breakingChanges": 0 } }, "changes": [ { "breaking": false, "change": 3, "changeHash": "VMePO-HloQp2n7CFp8rj0EV60TIPsQ1RneJRnwpYTAA=", "changeText": "object_added", "context": { "newColumn": 11, "newLine": 80 }, "new": "test", "original": "", "property": "properties" }, { "breaking": false, "change": 3, "changeHash": "AGK7dojIA4fx7E_gkgJ0KP-J9YZpNyct28IjRbaO3vE=", "changeText": "object_added", "context": { "newColumn": 11, "newLine": 77 }, "new": "testResultType", "original": "", "property": "properties" } ], "commitDetails": { "commitHash": "18a46e", "message": "New: ./new.json, Original: ./old.json", "author": "", "authorEmail": "", "committed": "2024-09-18T16:09:28.656168054+03:00", "changeReport": null } }
If we just rename field resultType to testResultType, we will have correct result with breaking change:
openapi-changes report ./old.json ./new.json { "reportSummary": { "components": { "totalChanges": 2, "breakingChanges": 1 } }, "changes": [ { "breaking": false, "change": 3, "changeHash": "AGK7dojIA4fx7E_gkgJ0KP-J9YZpNyct28IjRbaO3vE=", "changeText": "object_added", "context": { "newColumn": 11, "newLine": 77 }, "new": "testResultType", "original": "", "property": "properties" }, { "breaking": true, "change": 4, "changeHash": "0wYw40wu77CMYJOvUyA6ov1L3B6lIoODPxmyNkK2iw8=", "changeText": "object_removed", "context": { "originalColumn": 11, "originalLine": 77 }, "new": "", "original": "resultType", "property": "properties" } ], "commitDetails": { "commitHash": "4246ba", "message": "New: ./new.json, Original: ./old.json", "author": "", "authorEmail": "", "committed": "2024-09-18T16:15:33.685694174+03:00", "changeReport": null } }
Under certain conditions, breaking change is not detected:
Schema old.json: old.json
Schema new.json: new.json
The difference:
TestResult
entity fieldresultType
renamed totestResultType
TestResult
entity fieldtest
was addedExpected results: 3 changes, one breaking change:
testResultType
was addedtest
was addedresultType
was deleted (breaking)Actual result:
If we just rename field
resultType
totestResultType
, we will have correct result with breaking change: