-
Notifications
You must be signed in to change notification settings - Fork 24
Description
Is your feature request related to a problem?
- 我设置了 proto 如下:
syntax = "proto3";
package helloworld;
import "trpc/proto/trpc_options.proto";
import "trpc/swagger/swagger.proto";
import "validate/validate.proto";
option go_package = "trpc-http-demo/helloworld";
// HelloRequest is hello request.
message HelloRequest {
string msg = 1 [ (trpc.go_tag)='json:"xxx"', (validate.rules).string.email=true];
}
// HelloResponse is hello response.
message HelloResponse {
string msg = 1;
}
// HelloWorldService handles hello request and echo message.
service HelloWorldService {
// Hello says hello.
//@alias="/api/helloworld"
rpc Hello(HelloRequest) returns(HelloResponse);
}
-
运行命令行阐述 项目:
trpc create --protocol http -p ./hello-world.proto -f -o . --alias --gotag --validate -
修改配置文件,http端口号为9100
-
服务端错误:
2024-09-10 00:09:06.615 DEBUG server/service.go:235 service: helloworld.HelloWorldService handle err (if caused by health checking, this error can be ignored): type:framework, code:1, msg:service codec Unmarshal: proto: (line 2:5): unknown field "xxx"