Skip to content

Commit

Permalink
Upgrade version of oapi-codegen
Browse files Browse the repository at this point in the history
To get the latest features and bug fixes, we should bump to the latest
version of the library.
  • Loading branch information
jamietanna committed Feb 21, 2024
1 parent 16cf769 commit 144165a
Show file tree
Hide file tree
Showing 11 changed files with 37 additions and 48 deletions.
2 changes: 1 addition & 1 deletion cmd/lakectl/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"reflect"
"strings"

"github.com/deepmap/oapi-codegen/pkg/securityprovider"
"github.com/deepmap/oapi-codegen/v2/pkg/securityprovider"
"github.com/go-openapi/swag"
"github.com/mitchellh/go-homedir"
"github.com/mitchellh/mapstructure"
Expand Down
12 changes: 7 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ require (
github.com/cockroachdb/pebble v0.0.0-20230106151110-65ff304d3d7a
github.com/cubewise-code/go-mime v0.0.0-20200519001935-8c5762b177d8
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc
github.com/deepmap/oapi-codegen v1.5.6
github.com/deepmap/oapi-codegen/v2 v2.1.0
github.com/dgraph-io/ristretto v0.1.1
github.com/fsnotify/fsnotify v1.7.0
github.com/getkin/kin-openapi v0.53.0
github.com/getkin/kin-openapi v0.122.0
github.com/go-chi/chi/v5 v5.0.10
github.com/go-openapi/swag v0.19.14
github.com/go-openapi/swag v0.22.4
github.com/go-test/deep v1.1.0
github.com/gobwas/glob v0.2.3
github.com/golang/mock v1.6.0
Expand Down Expand Up @@ -137,11 +137,14 @@ require (
github.com/google/wire v0.5.0 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/invopop/yaml v0.2.0 // indirect
github.com/jackc/puddle/v2 v2.2.1 // indirect
github.com/klauspost/cpuid/v2 v2.2.5 // indirect
github.com/kylelemons/godebug v1.1.0 // indirect
github.com/mitchellh/hashstructure/v2 v2.0.2 // indirect
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect
github.com/pelletier/go-toml/v2 v2.1.0 // indirect
github.com/perimeterx/marshmallow v1.1.5 // indirect
github.com/pierrec/lz4/v4 v4.1.8 // indirect
github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect
github.com/repeale/fp-go v0.11.1 // indirect
Expand Down Expand Up @@ -189,8 +192,7 @@ require (
github.com/docker/go-units v0.5.0 // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/fatih/color v1.15.0 // indirect
github.com/ghodss/yaml v1.0.0 // indirect
github.com/go-openapi/jsonpointer v0.19.5 // indirect
github.com/go-openapi/jsonpointer v0.19.6 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/snappy v0.0.4 // indirect
Expand Down
53 changes: 20 additions & 33 deletions go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pkg/api/apigen/doc.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Package apigen provides generated code for our OpenAPI
package apigen

//go:generate go run github.com/deepmap/oapi-codegen/cmd/oapi-codegen@v1.5.6 -package apigen -generate "types,client,chi-server,spec" -templates ../tmpl -o lakefs.gen.go ../../../api/swagger.yml
//go:generate go run github.com/deepmap/oapi-codegen/v2/cmd/oapi-codegen@v2.1.0 -package apigen -generate "types,client,chi-server,spec" -templates ../tmpl -o lakefs.gen.go ../../../api/swagger.yml
2 changes: 1 addition & 1 deletion pkg/api/auth_middleware_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"testing"
"time"

"github.com/deepmap/oapi-codegen/pkg/securityprovider"
"github.com/deepmap/oapi-codegen/v2/pkg/securityprovider"
"github.com/gorilla/securecookie"
"github.com/gorilla/sessions"
"github.com/treeverse/lakefs/pkg/api"
Expand Down
2 changes: 1 addition & 1 deletion pkg/api/serve_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"testing"
"time"

"github.com/deepmap/oapi-codegen/pkg/securityprovider"
"github.com/deepmap/oapi-codegen/v2/pkg/securityprovider"
"github.com/go-openapi/swag"
"github.com/spf13/viper"
"github.com/treeverse/lakefs/pkg/actions"
Expand Down
2 changes: 1 addition & 1 deletion pkg/api/tmpl/inline.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

// Base64 encoded, gzipped, json marshaled Swagger object
var swaggerSpec = []string{
{{range .}}
{{range .SpecParts}}
"{{.}}",{{end}}
}

Expand Down
4 changes: 2 additions & 2 deletions pkg/auth/service.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package auth

//go:generate go run github.com/deepmap/oapi-codegen/cmd/oapi-codegen@v1.5.6 -package auth -generate "types,client" -o client.gen.go ../../api/authorization.yml
//go:generate go run github.com/deepmap/oapi-codegen/v2/cmd/oapi-codegen@v2.1.0 -package auth -generate "types,client" -o client.gen.go ../../api/authorization.yml
//go:generate go run github.com/golang/mock/[email protected] -package=mock -destination=mock/mock_auth_client.go github.com/treeverse/lakefs/pkg/auth ClientWithResponsesInterface

import (
Expand All @@ -15,7 +15,7 @@ import (

"github.com/aws/aws-sdk-go-v2/aws"
"github.com/cenkalti/backoff/v4"
"github.com/deepmap/oapi-codegen/pkg/securityprovider"
"github.com/deepmap/oapi-codegen/v2/pkg/securityprovider"
"github.com/getkin/kin-openapi/openapi3filter"
"github.com/go-openapi/swag"
"github.com/golang-jwt/jwt/v4"
Expand Down
2 changes: 1 addition & 1 deletion pkg/dockertest/lakefs_container.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/treeverse/lakefs/pkg/api/apigen"
"github.com/treeverse/lakefs/pkg/api/helpers"

"github.com/deepmap/oapi-codegen/pkg/securityprovider"
"github.com/deepmap/oapi-codegen/v2/pkg/securityprovider"
"github.com/ory/dockertest/v3"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/loadtest/loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"os"
"time"

"github.com/deepmap/oapi-codegen/pkg/securityprovider"
"github.com/deepmap/oapi-codegen/v2/pkg/securityprovider"
"github.com/google/uuid"
"github.com/jedib0t/go-pretty/v6/text"
"github.com/schollz/progressbar/v3"
Expand Down
2 changes: 1 addition & 1 deletion pkg/testutil/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
awsconfig "github.com/aws/aws-sdk-go-v2/config"
"github.com/aws/aws-sdk-go-v2/credentials"
"github.com/aws/aws-sdk-go-v2/service/s3"
"github.com/deepmap/oapi-codegen/pkg/securityprovider"
"github.com/deepmap/oapi-codegen/v2/pkg/securityprovider"
"github.com/spf13/viper"
"github.com/treeverse/lakefs/pkg/api/apigen"
"github.com/treeverse/lakefs/pkg/api/apiutil"
Expand Down

0 comments on commit 144165a

Please sign in to comment.