go install github.com/go-kiss/protoc-gen-markdown
protoc --markdown_out=Mhello.proto=./:. ./hello.proto
# set path prefix to /api
protoc --markdown_out=Mhello.proto=./,prefix=/api:. ./hello.proto
You could check the hello.md to see the result.
I have write a Chinese article to introduce how it works.