Skip to content

Commit 74cf2e0

Browse files
MB175Moritz Megerle
andauthored
Replace gopkg.in/yaml.v3 with go.yaml.in/yaml/v3 (#5857)
* feat: replace gopkg.in/yaml.v3 with go.yaml.in/yaml/v3 * feat: update bazel * feat: update bazel * feat: --------- Co-authored-by: Moritz Megerle <moritz.megerle@stackit.cloud>
1 parent 2fba191 commit 74cf2e0

File tree

14 files changed

+22
-15
lines changed

14 files changed

+22
-15
lines changed

MODULE.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ use_repo(
5757
"com_github_golang_protobuf",
5858
"com_github_google_go_cmp",
5959
"com_github_rogpeppe_fastuuid",
60-
"in_gopkg_yaml_v3",
60+
"in_yaml_go_yaml_v3",
6161
"org_golang_google_genproto_googleapis_api",
6262
"org_golang_google_genproto_googleapis_rpc",
6363
"org_golang_google_grpc",

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ require (
66
github.com/antihax/optional v1.0.0
77
github.com/google/go-cmp v0.7.0
88
github.com/rogpeppe/fastuuid v1.2.0
9+
go.yaml.in/yaml/v3 v3.0.4
910
golang.org/x/oauth2 v0.30.0
1011
golang.org/x/text v0.28.0
1112
google.golang.org/genproto/googleapis/api v0.0.0-20250818200422-3122310a409c
1213
google.golang.org/genproto/googleapis/rpc v0.0.0-20250818200422-3122310a409c
1314
google.golang.org/grpc v1.75.0
1415
google.golang.org/protobuf v1.36.7
15-
gopkg.in/yaml.v3 v3.0.1
1616
)
1717

1818
require (

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ go.opentelemetry.io/otel/sdk/metric v1.37.0 h1:90lI228XrB9jCMuSdA0673aubgRobVZFh
3535
go.opentelemetry.io/otel/sdk/metric v1.37.0/go.mod h1:cNen4ZWfiD37l5NhS+Keb5RXVWZWpRE+9WyVCpbo5ps=
3636
go.opentelemetry.io/otel/trace v1.37.0 h1:HLdcFNbRQBE2imdSEgm/kwqmQj1Or1l/7bW6mxVK7z4=
3737
go.opentelemetry.io/otel/trace v1.37.0/go.mod h1:TlgrlQ+PtQO5XFerSPUYG0JSgGyryXewPGyayAWSBS0=
38+
go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc=
39+
go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg=
3840
golang.org/x/net v0.41.0 h1:vBTly1HeNPEn3wtREYfy4GZ/NECgw2Cnl+nK6Nz3uvw=
3941
golang.org/x/net v0.41.0/go.mod h1:B/K4NNqkfmg07DQYrbwvSluqCJOOXwUjeb/5lOisjbA=
4042
golang.org/x/oauth2 v0.30.0 h1:dnDm7JmhM45NNpd8FDDeLhK6FwqbOf4MLCM9zb1BOHI=
@@ -56,5 +58,3 @@ google.golang.org/protobuf v1.36.7/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/
5658
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
5759
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
5860
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
59-
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
60-
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

internal/descriptor/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ go_library(
1919
"//internal/descriptor/openapiconfig",
2020
"//internal/httprule",
2121
"//protoc-gen-openapiv2/options",
22-
"@in_gopkg_yaml_v3//:yaml_v3",
22+
"@in_yaml_go_yaml_v3//:yaml",
2323
"@org_golang_google_genproto_googleapis_api//annotations",
2424
"@org_golang_google_grpc//grpclog",
2525
"@org_golang_google_protobuf//compiler/protogen",

internal/descriptor/grpc_api_configuration.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import (
77
"strings"
88

99
"github.com/grpc-ecosystem/grpc-gateway/v2/internal/descriptor/apiconfig"
10+
"go.yaml.in/yaml/v3"
1011
"google.golang.org/protobuf/encoding/protojson"
11-
"gopkg.in/yaml.v3"
1212
)
1313

1414
func loadGrpcAPIServiceFromYAML(yamlFileContents []byte, yamlSourceLogName string) (*apiconfig.GrpcAPIService, error) {

internal/descriptor/openapi_configuration.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import (
66
"os"
77

88
"github.com/grpc-ecosystem/grpc-gateway/v2/internal/descriptor/openapiconfig"
9+
"go.yaml.in/yaml/v3"
910
"google.golang.org/protobuf/encoding/protojson"
10-
"gopkg.in/yaml.v3"
1111
)
1212

1313
func loadOpenAPIConfigFromYAML(yamlFileContents []byte, yamlSourceLogName string) (*openapiconfig.OpenAPIConfig, error) {

protoc-gen-openapiv2/internal/genopenapi/BUILD.bazel

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ go_library(
2020
"//internal/descriptor",
2121
"//internal/generator",
2222
"//protoc-gen-openapiv2/options",
23-
"@in_gopkg_yaml_v3//:yaml_v3",
23+
"@in_yaml_go_yaml_v3//:yaml",
2424
"@org_golang_google_genproto_googleapis_api//annotations",
2525
"@org_golang_google_genproto_googleapis_api//visibility",
2626
"@org_golang_google_genproto_googleapis_rpc//status",
@@ -59,7 +59,7 @@ go_test(
5959
"//protoc-gen-openapiv2/options",
6060
"//runtime",
6161
"@com_github_google_go_cmp//cmp",
62-
"@in_gopkg_yaml_v3//:yaml_v3",
62+
"@in_yaml_go_yaml_v3//:yaml",
6363
"@org_golang_google_genproto_googleapis_api//annotations",
6464
"@org_golang_google_genproto_googleapis_api//visibility",
6565
"@org_golang_google_protobuf//encoding/protojson",

protoc-gen-openapiv2/internal/genopenapi/format.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"errors"
66
"io"
77

8-
"gopkg.in/yaml.v3"
8+
"go.yaml.in/yaml/v3"
99
)
1010

1111
type Format string

protoc-gen-openapiv2/internal/genopenapi/format_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"testing"
99

1010
"github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/internal/genopenapi"
11-
"gopkg.in/yaml.v3"
11+
"go.yaml.in/yaml/v3"
1212
)
1313

1414
func TestFormatValidate(t *testing.T) {

protoc-gen-openapiv2/internal/genopenapi/generator.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ import (
1313
"github.com/grpc-ecosystem/grpc-gateway/v2/internal/descriptor"
1414
gen "github.com/grpc-ecosystem/grpc-gateway/v2/internal/generator"
1515
openapioptions "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options"
16+
"go.yaml.in/yaml/v3"
1617
statuspb "google.golang.org/genproto/googleapis/rpc/status"
1718
"google.golang.org/grpc/grpclog"
1819
"google.golang.org/protobuf/proto"
1920
"google.golang.org/protobuf/reflect/protodesc"
2021
"google.golang.org/protobuf/types/descriptorpb"
2122
"google.golang.org/protobuf/types/known/anypb"
2223
"google.golang.org/protobuf/types/pluginpb"
23-
"gopkg.in/yaml.v3"
2424
)
2525

2626
var errNoTargetService = errors.New("no target service defined in the file")

0 commit comments

Comments
 (0)