I have all my proto files in a single folder. Some of protos import another proto, but I can't get the "-I" option to find the protos, no matter what I pass. I'm on a mac. I've tried "." and an absolute path, neither seem to work.
# go to the folder that has all my protos
$ cd ~/project/mycompany/stuff/superservice/v1/
# show the imports
$ grep -r import *
test_access.proto:import "mycompany/stuff/superservice/v1/customer_state.proto";
get_info.proto:import "mycompany/stuff/superservice/v1/customer_state.proto";
$ ls
get_info.proto
test_access.proto
tenant_state_enum.proto
# try and run it
$ P="$HOME/git/project"
$ docker run --rm \
-v $(pwd)/doc:/out \
-v $(pwd)/.:/protos \
pseudomuto/protoc-gen-doc \
-I "$P"
I have all my proto files in a single folder. Some of protos import another proto, but I can't get the "-I" option to find the protos, no matter what I pass. I'm on a mac. I've tried "." and an absolute path, neither seem to work.