Open kostiamol opened 2 years ago
command:
grpcurl \ -import-path dir/schema/protobuf/test \ -import-path github.com/googleapis/google/type/money.proto \ -proto dir/schema/protobuf/test/test.proto \ describe prototest.Price.FetchPriceByArticleId
output: Failed to process proto source files.: could not parse given files: test.proto:8:8: open dir/schema/protobuf/test/google/type/money.proto: no such file or directory
Failed to process proto source files.: could not parse given files: test.proto:8:8: open dir/schema/protobuf/test/google/type/money.proto: no such file or directory
working directory is parent for both dir and github.com
dir
github.com
dir/schema/protobuf/test/test.proto
syntax = "proto3"; package test; import "google/type/money.proto"; import "google/rpc/status.proto"; service Prices { rpc FetchPriceByArticleId (FetchPriceByArticleIdRequest) returns (FetchPriceByArticleIdResponse) {}; } message FetchPriceByArticleIdRequest { google.type.Money price_supply = 1; google.type.Money price_retail = 2; } message FetchPriceByArticleIdResponse { google.rpc.Status status = 1; google.type.Money price_retail = 2; }
Try this
grpcurl \ -import-path github.com/googleapis \ -proto dir/schema/protobuf/test/test.proto \ describe prototest.Price.FetchPriceByArticleId
command:
output:
Failed to process proto source files.: could not parse given files: test.proto:8:8: open dir/schema/protobuf/test/google/type/money.proto: no such file or directory
working directory is parent for both
dir
andgithub.com
dir/schema/protobuf/test/test.proto