v2 swagger scopes added to what-changed.

Added hashing functions to all v2 and v3 models that handle security, thats the next target.
This commit is contained in:
Dave Shanley
2022-10-23 14:23:30 -04:00
parent fcd4a0f57d
commit 3bc0a3a577
12 changed files with 367 additions and 6 deletions

View File

@@ -230,6 +230,20 @@ func CheckMapForChanges[T any, R any](expLeft, expRight map[low.KeyReference[str
return expChanges
}
//func CompareMapStrings(l, r low.ValueReference[string]) *Change {
//
// if l.Value != r.Value {
// return &Change{
// Context: CreateContext(l.ValueNode, r.ValueNode),
// ChangeType: Modified,
// Original: l.Value,
// New: r.Value,
// Breaking: false,
// }
// }
// return nil
//}
// ExtractStringValueSliceChanges will compare two low level string slices for changes.
func ExtractStringValueSliceChanges(lParam, rParam []low.ValueReference[string], changes *[]*Change, label string) {
lKeys := make([]string, len(lParam))