Skip to content

Custom template for protoc-gen-doc #121

@paweld2

Description

@paweld2

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    lang-docDoc rules specificpluginRegarding external pluginsresolved-next-releaseCode to resolve issue is pending release

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions