pseudomuto / protoc-gen-doc

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

Automatically generate documentation for imports #495

Open Zizico2 opened 1 year ago

Zizico2 commented 1 year ago

I couldn't find an issue answering this already. Is there any way to generate docs for dependencies automatically? Instead of having to specify all the input files manually.

mocosun commented 1 year ago

I have the same question here

jonathan-k4 commented 1 year ago

I ended up doing this...

pushd $PROTOS_DIR > /dev/null
LIST=$(find . -name "*.proto" | cut -c 3- | sort -t '\0' -n)
popd > /dev/null

echo "Generating docs..."
docker run --rm \
    -v $DOCS_DIR:/out:rw \
    -v $PROTOS_DIR:/protos:ro \
    -v $BASE_DIR/templates:/templates:ro \
    -v $API_DIR:/usr/include/google/api:ro \
    pseudomuto/protoc-gen-doc:latest --doc_opt=$DOC_OPTS $LIST

Which as you said, specifies all the input files, but at least not manually.