pseudomuto / protoc-gen-doc

Documentation generator plugin for Google Protocol Buffers
MIT License
2.62k stars 462 forks source link

Using glob for proto files #380

Open jzeferino opened 5 years ago

jzeferino commented 5 years ago

It is possible to use glob sintax to reference the proto files?

docker run --rm -v /home/work/proto/**/:/protos -v /home/work/a:/out pseudomuto/protoc-gen-doc --doc_opt=markdown,docs.md

twslankard commented 4 years ago

Any luck with this, @jzeferino? I'm trying to find out how to get the tool to traverse the source directories as well.

jzeferino commented 4 years ago

Well, what I ended up doing was to flatten the proto files and after that run the doc generation.

I was on a mac so I did this to flatten the protos:

mkdir ./proto_flat
find ./proto -name '*.proto' -exec mv {} ./proto_flat \;

And then:

docker run --rm -v /home/work/proto_flat -v /home/work/doc:/out pseudomuto/protoc-gen-doc --doc_opt=markdown,docs.md

anavgagneja commented 1 year ago

I tried the flattening approach and found that it broke all my import statements that reference other protos by directory structure... any other ideas? I see a couple PRs for this that are still open.