pseudomuto / protoc-gen-doc

Documentation generator plugin for Google Protocol Buffers
MIT License
2.63k stars 464 forks source link

All protos in one folder - "-I" doesnt seem to work - generation fails due to import fails #484

Open bradparks opened 2 years ago

bradparks commented 2 years ago

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"