swagger what-changed support climbing.

working through more rough edges, making some choices.
This commit is contained in:
Dave Shanley
2022-11-20 13:02:01 -05:00
parent e1e91d0682
commit 6c3cc97b04
9 changed files with 1633 additions and 722 deletions

View File

@@ -149,6 +149,10 @@ func CheckPropertyAdditionOrRemoval[T any](l, r *yaml.Node,
func CheckForRemoval[T any](l, r *yaml.Node, label string, changes *[]*Change, breaking bool, orig, new T) {
if l != nil && l.Value != "" && (r == nil || r.Value == "") {
CreateChange(changes, PropertyRemoved, label, l, r, breaking, orig, new)
return
}
if l != nil && r == nil {
CreateChange(changes, PropertyRemoved, label, l, nil, breaking, orig, nil)
}
}