protoc-gen-markdown

module
v0.0.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 22, 2024 License: MIT

README

protoc-gen-markdown - Generates markdown from proto files

protoc-gen-markdown is a plugin for protoc which generates GitHub-flavored markdown (GFM) from proto files.

By default, it will include validation defined by protovalidate.

It can also generate Mermaid diagrams via additional flags.

Usage

With buf
buf generate ./example/protos
With protoc directly
# Standard usage
protoc -I./example/protos/ \
  --markdown_out=paths=source_relative:./example/output/ \
  models/models.proto \
  service/service.proto

# Mermaid variant
protoc -I./example/protos/ \
  --markdown_out=mermaid=true,paths=source_relative:./example/output/ \
  models/models.proto \
  service/service.proto

# Exclude validation details
protoc -I./example/protos/ \
  --markdown_out=protovalidate=false,paths=source_relative:./example/output/ \
  models/models.proto \
  service/service.proto

Directories

Path Synopsis
cmd
protoc-gen-markdown
Package main is the entry point for the plugin
Package main is the entry point for the plugin
internal
converter
Package converter provides the main functionality of the plugin
Package converter provides the main functionality of the plugin
utils
Package utils provides utility functions for the protoc-gen-doc plugin
Package utils provides utility functions for the protoc-gen-doc plugin

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL