@@ -2236,18 +2236,7 @@ func extractSchemaChanges(
22362236 * sc = append (* sc , CompareSchemas (lEntities [lKeys [w ]], rEntities [rKeys [w ]]))
22372237 }
22382238 if w >= len (rKeys ) {
2239- // determine breaking status based on label
2240- breaking := true
2241- switch label {
2242- case v3 .AllOfLabel :
2243- breaking = BreakingRemoved (CompSchema , PropAllOf )
2244- case v3 .AnyOfLabel :
2245- breaking = BreakingRemoved (CompSchema , PropAnyOf )
2246- case v3 .OneOfLabel :
2247- breaking = BreakingRemoved (CompSchema , PropOneOf )
2248- case v3 .PrefixItemsLabel :
2249- breaking = BreakingRemoved (CompSchema , PropPrefixItems )
2250- }
2239+ breaking := schemaCompositionChangeBreaking (label , ObjectRemoved )
22512240 CreateChange (changes , ObjectRemoved , label ,
22522241 lEntities [lKeys [w ]].GetValueNode (), nil , breaking , lEntities [lKeys [w ]], nil )
22532242 }
@@ -2261,18 +2250,7 @@ func extractSchemaChanges(
22612250 * sc = append (* sc , CompareSchemas (lEntities [lKeys [w ]], rEntities [rKeys [w ]]))
22622251 }
22632252 if w >= len (lKeys ) {
2264- // determine breaking status based on label
2265- breaking := false
2266- switch label {
2267- case v3 .AllOfLabel :
2268- breaking = BreakingAdded (CompSchema , PropAllOf )
2269- case v3 .AnyOfLabel :
2270- breaking = BreakingAdded (CompSchema , PropAnyOf )
2271- case v3 .OneOfLabel :
2272- breaking = BreakingAdded (CompSchema , PropOneOf )
2273- case v3 .PrefixItemsLabel :
2274- breaking = BreakingAdded (CompSchema , PropPrefixItems )
2275- }
2253+ breaking := schemaCompositionChangeBreaking (label , ObjectAdded )
22762254 CreateChange (changes , ObjectAdded , label ,
22772255 nil , rEntities [rKeys [w ]].GetValueNode (), breaking , nil , rEntities [rKeys [w ]])
22782256 }
0 commit comments