Skip to content
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
7 changes: 5 additions & 2 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@
"bazel.buildifierExecutable": "/go/bin/buildifier",
"bazel.buildifierFixOnFormat": true,
"bazel.enableCodeLens": true,
"extensions": ["golang.Go", "bazelbuild.vscode-bazel"]
"extensions": [
"golang.Go",
"bazelbuild.vscode-bazel"
]
}
}
}
}
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,10 @@ proto:
--template ./protoc-gen-openapiv2/options/buf.gen.yaml \
--path ./protoc-gen-openapiv2/options/annotations.proto \
--path ./protoc-gen-openapiv2/options/openapiv2.proto
buf generate \
--template ./protoc-gen-openapiv3/options/buf.gen.yaml \
--path ./protoc-gen-openapiv3/options/annotations.proto \
--path ./protoc-gen-openapiv3/options/openapiv3.proto

generate: proto $(ECHO_EXAMPLE_SRCS) $(ABE_EXAMPLE_SRCS) $(UNANNOTATED_ECHO_EXAMPLE_SRCS) $(RESPONSE_BODY_EXAMPLE_SRCS) $(GENERATE_UNBOUND_METHODS_EXAMPLE_SRCS)

Expand Down
2 changes: 2 additions & 0 deletions internal/descriptor/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ go_library(
"//internal/codegenerator",
"//internal/descriptor/apiconfig",
"//internal/descriptor/openapiconfig",
"//internal/descriptor/openapiconfigv3:openapiconfig",
"//internal/httprule",
"//protoc-gen-openapiv2/options",
"//protoc-gen-openapiv3/options",
"@in_gopkg_yaml_v3//:yaml_v3",
"@org_golang_google_genproto_googleapis_api//annotations",
"@org_golang_google_grpc//grpclog",
Expand Down
32 changes: 32 additions & 0 deletions internal/descriptor/openapiconfigv3/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library")
load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
load("@rules_proto//proto:defs.bzl", "proto_library")

proto_library(
name = "openapiconfig_proto",
srcs = ["openapiconfig.proto"],
visibility = ["//:__subpackages__"],
deps = ["//protoc-gen-openapiv3/options:options_proto"],
)

go_proto_library(
name = "openapiconfig_go_proto",
compilers = ["//:go_apiv2"],
importpath = "github.com/grpc-ecosystem/grpc-gateway/v2/internal/descriptor/openapiconfigv3",
proto = ":openapiconfig_proto",
visibility = ["//:__subpackages__"],
deps = ["//protoc-gen-openapiv3/options"],
)

go_library(
name = "openapiconfig",
embed = [":openapiconfig_go_proto"],
importpath = "github.com/grpc-ecosystem/grpc-gateway/v2/internal/descriptor/openapiconfigv3",
visibility = ["//:__subpackages__"],
)

alias(
name = "go_default_library",
actual = ":openapiconfigv3",
visibility = ["//:__subpackages__"],
)
Loading