-
-
Notifications
You must be signed in to change notification settings - Fork 177
Custom template for protoc-gen-doc #121
Copy link
Copy link
Closed
Labels
lang-docDoc rules specificDoc rules specificpluginRegarding external pluginsRegarding external pluginsresolved-next-releaseCode to resolve issue is pending releaseCode to resolve issue is pending release
Milestone
Metadata
Metadata
Assignees
Labels
lang-docDoc rules specificDoc rules specificpluginRegarding external pluginsRegarding external pluginsresolved-next-releaseCode to resolve issue is pending releaseCode to resolve issue is pending release
For the protoc-gen-doc rules, I would like to use a custom template.
This is the official documentation of how to use custom templates:
https://github.com/pseudomuto/protoc-gen-doc/wiki/Custom-Templates
I assume that the rule could look like this:
doc_template_compile(
name = "place_doc_proto",
template = "customTemplate.tmpl",
protos = ["@rules_proto_grpc//example/proto:place_proto"],
)
As a example, I created a merge request to a add reStructuredText template to protoc-gen-doc:
pseudomuto/protoc-gen-doc#440
I could implement the rule, but I need some guide about how to pass the template file as a data to the protoc plugin execution. What I am missing specifically is: how to pass arguments from the rule,throw the aspect, to the plugin.