From 3cc4fdd6f358263ffde33ccbf61546f073979e32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Fri, 30 Apr 2021 13:16:23 +0200 Subject: [PATCH] deps: Update getkin/kin-openapi v0.60.0 => v0.61. --- go.mod | 2 +- go.sum | 2 ++ tpl/openapi/openapi3/openapi3.go | 8 ++++---- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index 3d7ccdac268..a52ef2ef4bb 100644 --- a/go.mod +++ b/go.mod @@ -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 diff --git a/go.sum b/go.sum index f095df4effd..885e937a494 100644 --- a/go.sum +++ b/go.sum @@ -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= diff --git a/tpl/openapi/openapi3/openapi3.go b/tpl/openapi/openapi3/openapi3.go index 8c6c5f4fb2c..b4c2e64fdf4 100644 --- a/tpl/openapi/openapi3/openapi3.go +++ b/tpl/openapi/openapi3/openapi3.go @@ -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") @@ -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) @@ -82,7 +82,7 @@ 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 }) @@ -90,5 +90,5 @@ func (ns *Namespace) Unmarshal(r resource.UnmarshableResource) (*kopenapi3.Swagg return nil, err } - return v.(*kopenapi3.Swagger), nil + return v.(*kopenapi3.T), nil }