pseudomuto / protoc-gen-doc

Documentation generator plugin for Google Protocol Buffers
MIT License
2.59k stars 462 forks source link

Document how to expose custom annotations #490

Open nurbo opened 2 years ago

nurbo commented 2 years ago

I found out that only some options (MethodOptions, MessageFieldOptions, etc.) are being processed, I presume those defined in the extensions module.

What additional steps would I need to take to be able to get my custom annotations exposed? I have annotations for quantities of message fields and wanted to use it in my self-made template, similarly to how I already use the google.api.http options.

Would be great if some information was provided in the documentation about how extensions are handled, for example in the contributing document.

sharonliao commented 1 year ago

I made modifications to support the exposure of custom annotation on my branch, https://github.com/sharonliao/protoc-gen-doc You can probably have a try on it. To support this feature, we need to modify the protokit first. And I'm planning to create a PR for it recently.