【发布时间】:2017-12-16 15:04:36
【问题描述】:
我正在尝试使用 gcloud 端点上的 gRPC helloworld 示例将 HTTP/JSON 转码为 gRPC。我对helloworld.proto 文件的注释是:
service Greeter {
// Sends a greeting
rpc SayHello (HelloRequest) returns (HelloReply) {
option (google.api.http) = {
post: "/v1/hello"
body: "name"
};
}
}
我的服务配置是:
http:
rules:
- selector: helloworld.Greeter.SayHello
post: /v1/hello
body: name
生成api_descriptor.pb文件后,我执行:
gcloud endpoints services deploy api_descriptor.pb api_config.yaml
我得到:
ERROR: (gcloud.endpoints.services.deploy) INVALID_ARGUMENT: Cannot convert to service config.
'ERROR: helloworld/helloworld.proto:43:3: http: body field path 'foo' must be a non-repeated message.'
任何帮助将不胜感激。 :)
【问题讨论】:
标签: google-cloud-endpoints grpc