Skip to content

Commit

Permalink
fix build with kin-openapi 0.61.0 (oapi-codegen#348)
Browse files Browse the repository at this point in the history
* fix build with kin-openapi 0.61.0

Addresses changes from getkin/kin-openapi#351

* go mod tidy
  • Loading branch information
adrianpk committed May 18, 2021
1 parent 46807f8 commit 356d6fe
Show file tree
Hide file tree
Showing 33 changed files with 97 additions and 97 deletions.
8 changes: 4 additions & 4 deletions examples/petstore-expanded/chi/api/petstore.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions examples/petstore-expanded/echo/api/petstore-server.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module github.com/deepmap/oapi-codegen

require (
github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c
github.com/getkin/kin-openapi v0.53.0
github.com/getkin/kin-openapi v0.61.0
github.com/go-chi/chi/v5 v5.0.0
github.com/golangci/lint-1 v0.0.0-20181222135242-d2cdd8c08219
github.com/labstack/echo/v4 v4.2.1
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM=
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
github.com/getkin/kin-openapi v0.53.0 h1:7WzP+MZRRe7YQz2Kc74Ley3dukJmXDvifVbElGmQfoA=
github.com/getkin/kin-openapi v0.53.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-chi/chi/v5 v5.0.0 h1:DBPx88FjZJH3FsICfDAfIfnb7XxKIYVGG6lOPlhENAg=
Expand Down
8 changes: 4 additions & 4 deletions internal/test/client/client.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions internal/test/components/components.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions internal/test/externalref/externalref.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions internal/test/externalref/packageA/externalref.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions internal/test/externalref/packageB/externalref.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions internal/test/issues/issue-312/issue.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions internal/test/issues/issue-52/issue.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/test/issues/issue-52/issue_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ components:
`

func TestIssue(t *testing.T) {
swagger, err := openapi3.NewSwaggerLoader().LoadSwaggerFromData([]byte(spec))
swagger, err := openapi3.NewLoader().LoadFromData([]byte(spec))
require.NoError(t, err)

opts := codegen.Options{
Expand Down
8 changes: 4 additions & 4 deletions internal/test/issues/issue-grab_import_names/issue.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/test/issues/issue-grab_import_names/issue_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
)

func TestLineComments(t *testing.T) {
swagger, err := openapi3.NewSwaggerLoader().LoadSwaggerFromFile("spec.yaml")
swagger, err := openapi3.NewLoader().LoadFromFile("spec.yaml")
require.NoError(t, err)

opts := codegen.Options{
Expand Down
8 changes: 4 additions & 4 deletions internal/test/issues/issue-illegal_enum_names/issue.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
)

func TestIllegalEnumNames(t *testing.T) {
swagger, err := openapi3.NewSwaggerLoader().LoadSwaggerFromFile("spec.yaml")
swagger, err := openapi3.NewLoader().LoadFromFile("spec.yaml")
require.NoError(t, err)

opts := codegen.Options{
Expand Down
8 changes: 4 additions & 4 deletions internal/test/parameters/parameters.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions internal/test/schemas/schemas.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pkg/chi-middleware/oapi_validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ type Options struct {

// OapiRequestValidator Creates middleware to validate request by swagger spec.
// This middleware is good for net/http either since go-chi is 100% compatible with net/http.
func OapiRequestValidator(swagger *openapi3.Swagger) func(next http.Handler) http.Handler {
func OapiRequestValidator(swagger *openapi3.T) func(next http.Handler) http.Handler {
return OapiRequestValidatorWithOptions(swagger, nil)
}

// OapiRequestValidatorWithOptions Creates middleware to validate request by swagger spec.
// This middleware is good for net/http either since go-chi is 100% compatible with net/http.
func OapiRequestValidatorWithOptions(swagger *openapi3.Swagger, options *Options) func(next http.Handler) http.Handler {
func OapiRequestValidatorWithOptions(swagger *openapi3.T, options *Options) func(next http.Handler) http.Handler {
router, err := legacy.NewRouter(swagger)
if err != nil {
panic(err)
Expand Down
Loading

0 comments on commit 356d6fe

Please sign in to comment.