datproject-discussions icon indicating copy to clipboard operation
datproject-discussions copied to clipboard

Auto-generate protocol documentation from inline comments in schema.proto

Open aschrijver opened this issue 7 years ago • 2 comments

For my message layer research wrt hypercore-protocol I was referred to the dat network protocol specification.

However, I found README docs to be outdated when looking at current schema.proto To avoid this, now and forever, you could auto-generate the documentation from inline documentation in the .proto file(s) itself.

For example with protoc-gen-doc from this:

You'd get outputs like this:

Benefits:

  • specification and documentation maintained in one place
  • specification and documentation never out-of-sync
  • documentation in multiple output formats

aschrijver avatar Jul 21 '17 09:07 aschrijver

Demonstration + documentation of auto-generation options using TravisCI

  • https://github.com/aschrijver/hypercore-protocol/tree/feature/document-generator

aschrijver avatar Jul 21 '17 16:07 aschrijver

Status: The owner of protoc-gen-doc has completely rewritten the project to Go and using docker. I am working with him to get the issues out of it and create nice markdown documentation layout.

  • See: https://github.com/aschrijver/hypercore-protocol/tree/feature/document-generator-new

aschrijver avatar Aug 04 '17 07:08 aschrijver