-
Notifications
You must be signed in to change notification settings - Fork 42
Closed
Labels
Description
I created a demo in a repo here.
Essentially, when using a local openapi.yaml file:
doc, err := loads.Spec("./openapi.yaml")
if err != nil {
log.Fatal(err)
}
an := analysis.New(doc.Spec()) // Analyze spec
err = analysis.Flatten(analysis.FlattenOpts{
Spec: an,
Expand: true,
})
if err != nil {
log.Fatalf("Flatten Failed: %v", err)
}
The call to Flatten fails with:
2021/01/26 11:41:38 Flatten Failed: read /Users/bbytheway/tmp/go-openapi-loader-test: is a directory
exit status 1
This functionality worked with
github.com/go-openapi/loads v0.19.7 // indirect
github.com/go-openapi/strfmt v0.19.6 // indirect
but is failing with the latest versions.