Generate a markdown document for a Protobuf file.
Usage:
go get -u github.com/aclisp/protodoc
protodoc demo.proto > demo.md
See demo.md
The Protobuf file generally has four sections:
- Service definitions, containing RPC methods
- Enumerations
- User defined types, called object
- RPC Request and Response objects
When generating a markdown document,
- <1> and <4> are combined together
- <2> and <3> are referenced by <4>
Inspired by protobuf 为经络,gRPC为骨架.
Only a subset of proto3 is supported as for best practice.
- No map, use the alternative equivalent syntax.
- Service rpc parameter should not has nested types.