Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
internal/descriptor: move to generated apiconfig test
- Loading branch information
1 parent
97ad693
commit f19e8be
Showing
9 changed files
with
245 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
load("@rules_proto//proto:defs.bzl", "proto_library") | ||
load("@io_bazel_rules_go//go:def.bzl", "go_library") | ||
load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library") | ||
|
||
package(default_visibility = ["//visibility:public"]) | ||
|
||
proto_library( | ||
name = "apiconfig_proto", | ||
srcs = [ | ||
"apiconfig.proto", | ||
], | ||
deps = [ | ||
"@go_googleapis//google/api:annotations_proto", | ||
], | ||
) | ||
|
||
go_proto_library( | ||
name = "apiconfig_go_proto", | ||
importpath = "github.com/grpc-ecosystem/grpc-gateway/v2/internal/descriptor/apiconfig", | ||
proto = ":apiconfig_proto", | ||
deps = ["@go_googleapis//google/api:annotations_go_proto"], | ||
) | ||
|
||
go_library( | ||
name = "go_default_library", | ||
embed = [":apiconfig_go_proto"], | ||
importpath = "github.com/grpc-ecosystem/grpc-gateway/v2/internal/descriptor/apiconfig", | ||
) |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
syntax = "proto3"; | ||
|
||
package grpc.gateway.internal.descriptor.apiconfig; | ||
|
||
option go_package = "github.com/grpc-ecosystem/grpc-gateway/v2/internal/descriptor/apiconfig"; | ||
|
||
import "google/api/http.proto"; | ||
|
||
// GrpcAPIService represents a stripped down version of google.api.Service . | ||
// Compare to https://github.com/googleapis/googleapis/blob/master/google/api/service.proto | ||
// The original imports 23 other protobuf files we are not interested in. If a significant | ||
// subset (>50%) of these start being reproduced in this file we should swap to using the | ||
// full generated version instead. | ||
// | ||
// For the purposes of the gateway generator we only consider a small subset of all | ||
// available features google supports in their service descriptions. Thanks to backwards | ||
// compatibility guarantees by protobuf it is safe for us to remove the other fields. | ||
message GrpcAPIService { | ||
// Http Rule. | ||
google.api.Http http = 1; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.