You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found out that only some options (MethodOptions, MessageFieldOptions, etc.) are being processed, I presume those defined in the extensions module.
I tried implementing my own simple transformer and register it with extensions.SetTransformer. However, the transformer is never called, because my options are not present in protokit.FieldDescriptor's OptionExtensions map.
Moreover, 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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: