Skip to content

Commit d61f9b3

Browse files
authored
Add warning note to RegisterXXXHandlerServer (#1399)
* deprecate Regiter_XXX_HandlerServer * use Register_XXX_FromEndpoint instead * fix deprecated description and tests * fix verbal * fix tests * change wording
1 parent 3217094 commit d61f9b3

File tree

13 files changed

+14
-2
lines changed

13 files changed

+14
-2
lines changed

examples/internal/helloworld/helloworld.pb.gw.go

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/internal/proto/examplepb/a_bit_of_everything.pb.gw.go

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/internal/proto/examplepb/echo_service.pb.gw.go

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/internal/proto/examplepb/flow_combination.pb.gw.go

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/internal/proto/examplepb/non_standard_names.pb.gw.go

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/internal/proto/examplepb/response_body_service.pb.gw.go

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/internal/proto/examplepb/stream.pb.gw.go

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/internal/proto/examplepb/unannotated_echo_service.pb.gw.go

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/internal/proto/examplepb/use_go_template.pb.gw.go

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/internal/proto/examplepb/wrappers.pb.gw.go

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

protoc-gen-grpc-gateway/internal/gengateway/template.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -564,6 +564,7 @@ func local_request_{{.Method.Service.GetName}}_{{.Method.GetName}}_{{.Index}}(ct
564564
// Register{{$svc.GetName}}{{$.RegisterFuncSuffix}}Server registers the http handlers for service {{$svc.GetName}} to "mux".
565565
// UnaryRPC :call {{$svc.GetName}}Server directly.
566566
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
567+
// Note that using this registration option will cause many gRPC library features (such as grpc.SendHeader, etc) to stop working. Consider using Register{{$svc.GetName}}{{$.RegisterFuncSuffix}}FromEndpoint instead.
567568
func Register{{$svc.GetName}}{{$.RegisterFuncSuffix}}Server(ctx context.Context, mux *runtime.ServeMux, server {{$svc.GetName}}Server) error {
568569
{{range $m := $svc.Methods}}
569570
{{range $b := $m.Bindings}}

protoc-gen-swagger/options/openapiv2.pb.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

protoc-gen-swagger/options/openapiv2.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ message Swagger {
2828
// it is not included, the API is served directly under the host. The value
2929
// MUST start with a leading slash (/). The basePath does not support path
3030
// templating.
31-
// Note that using `base_path` does not change the endpoint paths that are
31+
// Note that using this registration option will cause many gRPC library features (such as grpc.SendHeader, etc) to stop working. Consider using `base_path` does not change the endpoint paths that are
3232
// generated in the resulting Swagger file. If you wish to use `base_path`
3333
// with relatively generated Swagger paths, the `base_path` prefix must be
3434
// manually removed from your `google.api.http` paths and your code changed to

0 commit comments

Comments
 (0)