Open nurbo opened 2 years 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.
I found out that only some options (MethodOptions, MessageFieldOptions, etc.) are being processed, I presume those defined in the extensions module.
extensions.SetTransformer
. However, the transformer is never called, because my options are not present inprotokit.FieldDescriptor
'sOptionExtensions
map.GetOptions()
does not return a "well formatted" value like the envoyproxy's validate options, but appears as a raw string, for example:"\n\x15\n\x10electriccurrent\x12\x01I\x12\x12\n\x06ampere\x12\x01A\x1a\x05milli\x18\x01X\x01"
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.