Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bump oapi-codegen to v2.4.1 #765

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ jobs:
- name: Autogenerate Go code
run: |
go version
go install github.com/deepmap/oapi-codegen/cmd/oapi-codegen@v1.12
go install github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen@v2.4.1
make codegen-go
# Always run this step so that all linting errors can be seen at once.
if: always()
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
with:
go-version: 1.22.x
- name: Install Go tools
run: go install github.com/deepmap/oapi-codegen/cmd/oapi-codegen@v1.12
run: go install github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen@v2.4.1
- name: Build Go
run: |
make nexus
Expand Down Expand Up @@ -108,7 +108,7 @@ jobs:
go-version: 1.22.x
- name: Autogenerate Go code
run: |
go install github.com/deepmap/oapi-codegen/cmd/oapi-codegen@v1.12
go install github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen@v2.4.1
make codegen-go
- name: Build docker
run: make docker
Expand Down Expand Up @@ -152,7 +152,7 @@ jobs:
go-version: 1.22.x
- name: Autogenerate Go code
run: |
go install github.com/deepmap/oapi-codegen/cmd/oapi-codegen@v1.12
go install github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen@v2.4.1
make codegen-go
- name: Build Go
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
with:
go-version: 1.21
- name: Install Go tools
run: go install github.com/deepmap/oapi-codegen/cmd/oapi-codegen@v1.12
run: go install github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen@v2.4.1

# Prepare the GitHub release.
- name: Install GoReleaser
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ build:

# Generate Go types from the openapi spec.
# To install the tool, run:
# go install github.com/deepmap/oapi-codegen/cmd/oapi-codegen@v1.12
# go install github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen@v2.4.1
codegen-go:
@oapi-codegen --version | grep -qE '^v1.12.' || echo "ERROR: Installed oapi-codegen is not v1.12.x. See Makefile."
@oapi-codegen --version | grep -qE '^v2.4' || echo "ERROR: Installed oapi-codegen is not v2.4.x. See Makefile."
@scripts/namespace_codegen_templates.sh
@echo $$'compatibility:\n always-prefix-enum-values: true' > /tmp/codegen-config.yaml
oapi-codegen -generate types -config /tmp/codegen-config.yaml -templates /tmp/namespaced-templates/ -package types api/spec/v1.yaml >api/v1/types/openapi.gen.go
Expand Down
1 change: 0 additions & 1 deletion api/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ func HttpCodeForError(err error) int {
errType == reflect.TypeOf(apiTypes.RequiredHeaderError{}) ||
errType == reflect.TypeOf(apiTypes.RequiredParamError{}) ||
errType == reflect.TypeOf(apiTypes.UnescapedCookieParamError{}) ||
errType == reflect.TypeOf(apiTypes.UnmarshallingParamError{}) ||
errType == reflect.TypeOf(apiTypes.TooManyValuesForParamError{})):
return http.StatusBadRequest
default:
Expand Down
2 changes: 1 addition & 1 deletion docker/nexus/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ WORKDIR /code/go
COPY . ./

RUN \
go install github.com/deepmap/oapi-codegen/cmd/oapi-codegen@v1.12 && \
go install github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen@v2.4.1 && \
make codegen-go && \
go mod download && \
go build
Expand Down
23 changes: 13 additions & 10 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ require (
github.com/prometheus/client_golang v1.19.0
github.com/spf13/cobra v1.8.0
github.com/stretchr/testify v1.9.0
golang.org/x/sync v0.7.0
golang.org/x/sync v0.8.0
google.golang.org/grpc v1.63.2
gopkg.in/yaml.v2 v2.4.0 // indirect
)
Expand Down Expand Up @@ -60,14 +60,14 @@ require (
github.com/ethereum/c-kzg-4844 v1.0.0 // indirect
github.com/fatih/color v1.14.1 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/getkin/kin-openapi v0.107.0 // indirect
github.com/getkin/kin-openapi v0.127.0 // indirect
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
github.com/go-git/go-billy/v5 v5.5.0 // indirect
github.com/go-git/go-git/v5 v5.11.0 // indirect
github.com/go-kit/kit v0.12.0 // indirect
github.com/go-logfmt/logfmt v0.5.1 // indirect
github.com/go-openapi/jsonpointer v0.19.5 // indirect
github.com/go-openapi/swag v0.21.1 // indirect
github.com/go-openapi/jsonpointer v0.21.0 // indirect
github.com/go-openapi/swag v0.23.0 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/glog v1.2.0 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
Expand All @@ -85,7 +85,7 @@ require (
github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d // indirect
github.com/holiman/uint256 v1.2.4 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/invopop/yaml v0.1.0 // indirect
github.com/invopop/yaml v0.3.1 // indirect
github.com/ipfs/go-cid v0.4.1 // indirect
github.com/ipfs/go-log/v2 v2.5.1 // indirect
github.com/jackc/pgpassfile v1.0.0 // indirect
Expand All @@ -96,8 +96,8 @@ require (
github.com/kevinburke/ssh_config v1.2.0 // indirect
github.com/klauspost/compress v1.17.7 // indirect
github.com/klauspost/cpuid/v2 v2.2.7 // indirect
github.com/labstack/echo/v4 v4.9.1 // indirect
github.com/labstack/gommon v0.4.0 // indirect
github.com/labstack/echo/v4 v4.11.4 // indirect
github.com/labstack/gommon v0.4.2 // indirect
github.com/lib/pq v1.10.7 // indirect
github.com/libp2p/go-buffer-pool v0.1.0 // indirect
github.com/libp2p/go-libp2p v0.33.2 // indirect
Expand Down Expand Up @@ -125,6 +125,7 @@ require (
github.com/oasisprotocol/deoxysii v0.0.0-20220228165953-2091330c22b7 // indirect
github.com/oklog/run v1.0.0 // indirect
github.com/pelletier/go-toml/v2 v2.1.0 // indirect
github.com/perimeterx/marshmallow v1.1.5 // indirect
github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 // indirect
github.com/pjbgf/sha1cd v0.3.0 // indirect
github.com/pkg/errors v0.9.1 // indirect
Expand All @@ -147,6 +148,7 @@ require (
github.com/subosito/gotenv v1.6.0 // indirect
github.com/supranational/blst v0.3.11 // indirect
github.com/tidwall/btree v1.6.0 // indirect
github.com/ugorji/go/codec v1.2.11 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/valyala/fasttemplate v1.2.2 // indirect
github.com/x448/float16 v0.8.4 // indirect
Expand All @@ -156,11 +158,11 @@ require (
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.27.0 // indirect
golang.org/x/mod v0.17.0 // indirect
golang.org/x/net v0.24.0 // indirect
golang.org/x/net v0.25.0 // indirect
golang.org/x/oauth2 v0.18.0 // indirect
golang.org/x/sys v0.20.0 // indirect
golang.org/x/text v0.15.0 // indirect
golang.org/x/tools v0.20.0 // indirect
golang.org/x/text v0.18.0 // indirect
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect
google.golang.org/grpc/security/advancedtls v0.0.0-20221004221323-12db695f1648 // indirect
Expand All @@ -176,6 +178,7 @@ require (
github.com/akrylysov/pogreb v0.10.1
github.com/deepmap/oapi-codegen v1.12.4
github.com/fxamacker/cbor/v2 v2.4.0
github.com/oapi-codegen/runtime v1.1.1
github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a
github.com/oasisprotocol/metadata-registry-tools v0.0.0-20230424075921-93d132769e14
github.com/rs/cors v1.8.3
Expand Down
Loading
Loading