Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using glob for proto files #380

Open
jzeferino opened this issue Feb 4, 2019 · 3 comments · May be fixed by #437 or zc-tech/protoc-gen-doc#3
Open

Using glob for proto files #380

jzeferino opened this issue Feb 4, 2019 · 3 comments · May be fixed by #437 or zc-tech/protoc-gen-doc#3

Comments

@jzeferino
Copy link

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
Copy link

twslankard commented Sep 24, 2019

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

@jzeferino
Copy link
Author

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

Falco20019 added a commit to Falco20019/protoc-gen-doc that referenced this issue Jan 15, 2021
@Falco20019 Falco20019 linked a pull request Jan 15, 2021 that will close this issue
@anavgagneja
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants