protoc-gen-doc icon indicating copy to clipboard operation
protoc-gen-doc copied to clipboard

Automatically generate documentation for imports

Open Zizico2 opened this issue 3 years ago • 2 comments

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.

Zizico2 avatar Sep 20 '22 03:09 Zizico2

I have the same question here

mocosun avatar Dec 19 '22 08:12 mocosun

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.

jonathan-k4 avatar Mar 24 '23 19:03 jonathan-k4