Does gRPC support generating documentation for services like Swagger?
3 Answers
protoc-gen-doc is a protoc
plugin which generates HTML docs using Go HTML templates. Although it isn't being used by the original sponsor company anymore, it looks like a good starting point.

- 2,694
- 2
- 23
- 24
Your protofiles are the documentation. You can put comments there to clarify meaning of parameters or service methods.

- 251
- 3
- 12
-
7I suppose the proto file can be the source of documentation, but it'd still desirable to generate a pretty looking HTML with links between message types, service call examples and all that good stuff. – Max Ng Aug 18 '15 at 22:14
-
Googling `generate html documentation for grpc` gives the link [link](https://github.com/sourcegraph/prototools) which you can try to use. Apart from that, you can generate documentation from the source code that was generated from protofiles. E.g. in java generated source all comments from your .proto file will appear in javadocs. – Timmy Aug 19 '15 at 02:07
I started working on a new open source documentation tool called Sabledocs for generating docs for Protobuf and gRPC contracts.
You can use it by generating a binary descriptor of your Protobuf files:
protoc *.proto -o descriptor.pb --include_source_info
Installing the sabledocs
CLI. (Requires Python >=3.11)
pip install sabledocs
And running the sabledocs
command.
sabledocs
The documentation will be generated into a folder sabledocs_output
, its main page can be opened with index.html
.
You can see a demo of a generated documentation site here, and find more info in the repository and in this blog post.

- 7,737
- 8
- 42
- 81