Skip to content

Commit

Permalink
deps: Update getkin/kin-openapi v0.60.0 => v0.61.
Browse files Browse the repository at this point in the history
  • Loading branch information
bep committed Apr 30, 2021
1 parent 7eb80a9 commit 3cc4fdd
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ require (
github.com/fortytw2/leaktest v1.3.0
github.com/frankban/quicktest v1.12.0
github.com/fsnotify/fsnotify v1.4.9
github.com/getkin/kin-openapi v0.60.0
github.com/getkin/kin-openapi v0.61.0
github.com/ghodss/yaml v1.0.0
github.com/gobuffalo/flect v0.2.2
github.com/gobwas/glob v0.2.3
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,8 @@ github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWo
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
github.com/getkin/kin-openapi v0.60.0 h1:wnTPS0Vrq4CmlmLCACY/bQXduBThkZOb5OLQfBW5FiM=
github.com/getkin/kin-openapi v0.60.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4=
github.com/getkin/kin-openapi v0.61.0 h1:6awGqF5nG5zkVpMsAih1QH4VgzS8phTxECUWIFo7zko=
github.com/getkin/kin-openapi v0.61.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4=
github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk=
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
Expand Down
8 changes: 4 additions & 4 deletions tpl/openapi/openapi3/openapi3.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ type Namespace struct {
deps *deps.Deps
}

func (ns *Namespace) Unmarshal(r resource.UnmarshableResource) (*kopenapi3.Swagger, error) {
func (ns *Namespace) Unmarshal(r resource.UnmarshableResource) (*kopenapi3.T, error) {
key := r.Key()
if key == "" {
return nil, errors.New("no Key set in Resource")
Expand All @@ -71,7 +71,7 @@ func (ns *Namespace) Unmarshal(r resource.UnmarshableResource) (*kopenapi3.Swagg
return nil, err
}

s := &kopenapi3.Swagger{}
s := &kopenapi3.T{}
switch f {
case metadecoders.YAML:
err = gyaml.Unmarshal(b, s)
Expand All @@ -82,13 +82,13 @@ func (ns *Namespace) Unmarshal(r resource.UnmarshableResource) (*kopenapi3.Swagg
return nil, err
}

err = kopenapi3.NewSwaggerLoader().ResolveRefsIn(s, nil)
err = kopenapi3.NewLoader().ResolveRefsIn(s, nil)

return s, err
})
if err != nil {
return nil, err
}

return v.(*kopenapi3.Swagger), nil
return v.(*kopenapi3.T), nil
}

0 comments on commit 3cc4fdd

Please sign in to comment.