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
mgabeler-lee-6rs authored May 18, 2021
1 parent bcb6a1f commit c3be518
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 c3be518

Please sign in to comment.