diff --git a/internal/bundlegen/generateapi.go b/internal/bundlegen/generateapi.go index 68a9bfdc6..909759750 100644 --- a/internal/bundlegen/generateapi.go +++ b/internal/bundlegen/generateapi.go @@ -115,7 +115,7 @@ func LoadDocumentFromFile(filePath string, validate bool, formatValidation bool) var jsonContent []byte // see ./test/circular-reference.json and https://github.com/apigee/apigeecli/issues/199 - openapi3.CircularReferenceCounter = 10 + openapi3.CircularReferenceCounter = 20 doc, err = openapi3.NewLoader().LoadFromFile(filePath) if err != nil { @@ -162,6 +162,9 @@ func LoadDocumentFromURI(uri string, validate bool, formatValidation bool) (stri return "", nil, err } + // see ./test/circular-reference.json and https://github.com/apigee/apigeecli/issues/199 + openapi3.CircularReferenceCounter = 20 + doc, err = openapi3.NewLoader().LoadFromURI(u) if err != nil { return "", nil, err