Skip to content

Commit

Permalink
openapi3: add length of circular reference to error message (#839)
Browse files Browse the repository at this point in the history
  • Loading branch information
jamietanna authored Sep 16, 2023
1 parent 2d85e01 commit 62849cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion openapi3/loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,7 @@ func (loader *Loader) resolveSchemaRef(doc *T, component *SchemaRef, documentPat
} else {
if visitedLimit(visited, ref) {
visited = append(visited, ref)
return fmt.Errorf("%s - %s", CircularReferenceError, strings.Join(visited, " -> "))
return fmt.Errorf("%s with length %d - %s", CircularReferenceError, len(visited), strings.Join(visited, " -> "))
}
visited = append(visited, ref)

Expand Down

0 comments on commit 62849cf

Please sign in to comment.