grpc-graphql-gateway
grpc-graphql-gateway copied to clipboard
Resolve source_relative not respecting subpath proto files
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.