Closed andrey308 closed 1 year ago
Hi @andrey308 ,
Full path is supported starting from the first known field name.
Notice that even in your example, foo
and bar
are not fields name but just the lower case name so the messages. for foo
or bar
to be part of the fieldmask path, they need to be the name of a field in message that contains them.
For example:
message Baz {
Foo foo = 1;
}
baz := Baz{}
baz.FieldMaskPaths().Foo().Bar() // will return "foo.bar"
I'm closing this issue for now, but feel free to respond if you still disagree.
Let's add generation full path generator, which will generate path from message name to field name.
Problem: for example in one proto file can be several duplicated field names:
After generation we will receive smth like this:
It is a problem due to one proto file can be like namespace. So it can be useful to have absolute path of each field in namespace.