The document generally said you can use the same extension number for different level of options, but the qualified extension name needs to be unique. e.g. a single extension name cannot extend more than one type. That said, you probably have to use different option name for the purpose.
Note, there's some internal effort to support docs in generated file; hopefully will be included in the next major release. On Sat, Sep 17, 2011 at 3:20 AM, Thiago Cangussu <[email protected]> wrote: > Hi, > > I am trying to create an option (documentation) that appears at > different levels (message-level, field-level, etc), but I got an error > saying that the name was already defined in the package. The > documentation states that: > > Also, note that each option type (file-level, message-level, > field-level, etc.) has its own number space, so e.g. you could declare > extensions of FieldOptions and MessageOptions with the same number. > > Does it make sense to have a separate number space and a common > option-name space? Am I doing something wrong? > > I'm trying to use the custom option (documentation) to create > self-documented messages. The idea is to use a plugin to generate the > documentation. > > Regards, > Thiago > > -- > You received this message because you are subscribed to the Google Groups > "Protocol Buffers" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/protobuf?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/protobuf?hl=en.
