grpc-graphql-gateway icon indicating copy to clipboard operation
grpc-graphql-gateway copied to clipboard

Resolve source_relative not respecting subpath proto files

Open alehechka opened this issue 2 years ago • 0 comments

The source_relative option will only generate the resulting .go file into the specified out directory. However, when .proto files are nested down a path, other protoc plugins will respect the paths and output the files down the same file path.

Following grpc-gateway, they use the .proto's file path as a prefix to the path of the generate .go file.

Additionally, I followed a similar pattern of retrieving the filename prefix to refactor the retrieval of the file name when source_relative is not used.

alehechka avatar Jul 26 '22 01:07 alehechka