Skip to content

Commit b9afd59

Browse files
authored
Merge pull request #2965 from EarthSoar/fix-isssue-2967
fix: diff result has no URL, when there is an object type array field…
2 parents 062d778 + e0c83ea commit b9afd59

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

diff/spec_analyser.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -746,7 +746,11 @@ func (sd *SpecAnalyser) schemaFromRef(ref spec.Ref, defns *spec.Definitions) (ac
746746
}
747747

748748
func schemaLocationKey(location DifferenceLocation) string {
749-
return location.Method + location.URL + location.Node.Field + location.Node.TypeName
749+
k := location.Method + location.URL + location.Node.Field + location.Node.TypeName
750+
if location.Node.ChildNode != nil && location.Node.ChildNode.IsArray {
751+
k += location.Node.ChildNode.Field + location.Node.ChildNode.TypeName
752+
}
753+
return k
750754
}
751755

752756
// PropertyDefn combines a property with its required-ness

0 commit comments

Comments
 (0)