mirror of
https://github.com/LukeHagar/libopenapi.git
synced 2025-12-06 20:47:49 +00:00
fix: continued moving everything to orderedmaps plus cleaned up most the tests
This commit is contained in:
@@ -56,7 +56,6 @@ func (c *CallbackChanges) TotalBreakingChanges() int {
|
||||
// CompareCallback will compare two Callback objects and return a pointer to CallbackChanges with all the things
|
||||
// that have changed between them.
|
||||
func CompareCallback(l, r *v3.Callback) *CallbackChanges {
|
||||
|
||||
cc := new(CallbackChanges)
|
||||
var changes []*Change
|
||||
|
||||
@@ -66,12 +65,12 @@ func CompareCallback(l, r *v3.Callback) *CallbackChanges {
|
||||
lValues := make(map[string]low.ValueReference[*v3.PathItem])
|
||||
rValues := make(map[string]low.ValueReference[*v3.PathItem])
|
||||
|
||||
for pair := orderedmap.First(l.Expression.Value); pair != nil; pair = pair.Next() {
|
||||
for pair := orderedmap.First(l.Expression); pair != nil; pair = pair.Next() {
|
||||
lHashes[pair.Key().Value] = low.GenerateHashString(pair.Value().Value)
|
||||
lValues[pair.Key().Value] = pair.Value()
|
||||
}
|
||||
|
||||
for pair := orderedmap.First(r.Expression.Value); pair != nil; pair = pair.Next() {
|
||||
for pair := orderedmap.First(r.Expression); pair != nil; pair = pair.Next() {
|
||||
rHashes[pair.Key().Value] = low.GenerateHashString(pair.Value().Value)
|
||||
rValues[pair.Key().Value] = pair.Value()
|
||||
}
|
||||
@@ -94,7 +93,7 @@ func CompareCallback(l, r *v3.Callback) *CallbackChanges {
|
||||
expChanges[k] = ComparePathItems(lValues[k].Value, rValues[k].Value)
|
||||
}
|
||||
|
||||
//check right path item hashes
|
||||
// check right path item hashes
|
||||
for k := range rHashes {
|
||||
lhash := lHashes[k]
|
||||
if lhash == "" {
|
||||
|
||||
Reference in New Issue
Block a user