Skip to content

Commit

Permalink
Allow specs with remote references again.
Browse files Browse the repository at this point in the history
  • Loading branch information
bojanz committed Jan 1, 2024
1 parent a16c72a commit f4dbacd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion spec.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (

"github.com/iancoleman/strcase"
"github.com/pb33f/libopenapi"
"github.com/pb33f/libopenapi/datamodel"
"github.com/pb33f/libopenapi/datamodel/high/base"
v3 "github.com/pb33f/libopenapi/datamodel/high/v3"
"github.com/pb33f/libopenapi/orderedmap"
Expand Down Expand Up @@ -58,7 +59,9 @@ func LoadSpec(filename string) (v3.Document, error) {
if err != nil {
return v3.Document{}, err
}
doc, err := libopenapi.NewDocument(b)
doc, err := libopenapi.NewDocumentWithConfiguration(b, &datamodel.DocumentConfiguration{
AllowRemoteReferences: true,
})
if err != nil {
return v3.Document{}, err
}
Expand Down

0 comments on commit f4dbacd

Please sign in to comment.