mirror of
https://github.com/LukeHagar/libopenapi.git
synced 2025-12-07 04:20:14 +00:00
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:
@@ -559,8 +559,8 @@ func AreEqual(l, r Hashable) bool {
|
||||
func GenerateHashString(v any) string {
|
||||
if h, ok := v.(Hashable); ok {
|
||||
if h != nil {
|
||||
return fmt.Sprintf("%x", h.Hash())
|
||||
return fmt.Sprintf(HASH, h.Hash())
|
||||
}
|
||||
}
|
||||
return fmt.Sprintf("%x", sha256.Sum256([]byte(fmt.Sprint(v))))
|
||||
return fmt.Sprintf(HASH, sha256.Sum256([]byte(fmt.Sprint(v))))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user