grpcurl icon indicating copy to clipboard operation
grpcurl copied to clipboard

Grpcurl not able to parse validate/validate.proto

Open prssnk opened this issue 3 years ago • 1 comments
trafficstars

We have implemented proto messages that uses envoy validate.proto to validate fields within messages. The application consuming the proto is implemented using spring boot and works fine correctly. The grpcurl command fails with validate/validate.proto no such file or directory. The command: ./grpcurl -d '{"userId": "123"}' -import-path /home/psankaranarayanan/staging/pcap-service-contracts/core-api-contract/src/main/proto/ -proto account_service.proto com.account.AccountService/getAccounts

prssnk avatar Oct 20 '22 13:10 prssnk

Does validate/validate.proto also exist under /home/psankaranarayanan/staging/pcap-service-contracts/core-api-contract/src/main/proto/?

If not, that's the problem: you have to tell grpcurl where all of your proto sources will be using -import-path (much like using -I arguments to protoc).

jhump avatar Oct 20 '22 13:10 jhump