Skip to content
This repository has been archived by the owner on Sep 13, 2023. It is now read-only.

Commit

Permalink
chore(openapi): update openapi lib
Browse files Browse the repository at this point in the history
  • Loading branch information
sashamelentyev committed Feb 9, 2022
1 parent 571b7be commit 9b55e8f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ require (
github.com/goccy/go-yaml v1.9.5
github.com/lamoda/gonkey v1.13.2
github.com/neotoolkit/faker v0.1.2
github.com/neotoolkit/openapi v0.5.1
github.com/neotoolkit/openapi v0.7.0
github.com/rs/zerolog v1.26.1
github.com/stretchr/testify v1.7.0
)
Expand All @@ -25,7 +25,7 @@ require (
github.com/tidwall/gjson v1.13.0 // indirect
github.com/tidwall/match v1.1.1 // indirect
github.com/tidwall/pretty v1.2.0 // indirect
golang.org/x/sys v0.0.0-20220114195835-da31bd327af9 // indirect
golang.org/x/sys v0.0.0-20220207234003-57398862261d // indirect
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9
github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
github.com/neotoolkit/faker v0.1.2 h1:4/Xbk8DssKBZFUA/wIpWeGvWM9KMlQoitLFck3KROdg=
github.com/neotoolkit/faker v0.1.2/go.mod h1:ChsI+y4MR3t1Ybbt0ktUXqDVJTq9w9oXuL59jJ5ufF4=
github.com/neotoolkit/openapi v0.5.1 h1:JDHKjlx924Ml6ilwx80c4/d3CuMdt2XYETnQM50+hs8=
github.com/neotoolkit/openapi v0.5.1/go.mod h1:gjP+o4cR08QAZaVFIvJP6rsBoBlqz34hovntey1r4ks=
github.com/neotoolkit/openapi v0.7.0 h1:y/AGnqVMgG6h1vps6e5lCEVYlim99PIiE+zvxH0Xduc=
github.com/neotoolkit/openapi v0.7.0/go.mod h1:gjP+o4cR08QAZaVFIvJP6rsBoBlqz34hovntey1r4ks=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
Expand Down Expand Up @@ -82,8 +82,8 @@ golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220114195835-da31bd327af9 h1:XfKQ4OlFl8okEOr5UvAqFRVj8pY/4yfcXrddB8qAbU0=
golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220207234003-57398862261d h1:Bm7BNOQt2Qv7ZqysjeLjgCBanX+88Z/OtdvsrEv1Djc=
golang.org/x/sys v0.0.0-20220207234003-57398862261d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
Expand Down
4 changes: 2 additions & 2 deletions internal/api/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ func (b *Builder) Set(path, method string, o *openapi.Operation) (Operation, err
if ok {
var s openapi.Schema

if body.Schema.Ref != "" {
if body.Schema.IsRef() {
schema, err := b.OpenAPI.LookupByReference(body.Schema.Ref)
if err != nil {
return Operation{}, fmt.Errorf("resolve reference: %w", err)
Expand Down Expand Up @@ -222,7 +222,7 @@ func (b *Builder) Set(path, method string, o *openapi.Operation) (Operation, err
}

func (b *Builder) convertSchema(s openapi.Schema) (Schema, error) {
if s.Ref != "" {
if s.IsRef() {
schema, err := b.OpenAPI.LookupByReference(s.Ref)
if err != nil {
return nil, fmt.Errorf("resolve reference: %w", err)
Expand Down

0 comments on commit 9b55e8f

Please sign in to comment.