target server does not expose service xyz.XYZService
laurijssen opened this issue · 1 comments
Consider the following message using an enum:
enum Provider {
Post = 0;
Call = 1;
}
message RequestMessage {
Provider provider = 1;
}
and compiling with
protoc -I/usr/local/include -I.
-I$(GOPATH)/src
-I$(GOPATH)/src/github.com/googleapis/googleapis
--descriptor_set_out=../proto/api_descriptor.pb
--go_out=plugins=grpc:../proto
--swagger_out=logtostderr=true:../swagger
--include_imports
--govalidators_out=../proto
*.proto
This works fine.
But after adding
import "github.com/mwitkow/go-proto-validators/validator.proto";
message RequestMessage {
Provider provider = 1 [(validator.field) = {is_in_enum : true}];
}
Now compile the same and the service becomes unaccessible over a grppc gateway:
Error invoking method "con.Service/New": target server does not expose service "con.Service"
This is a known issue I see now