New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
types/known/fieldmaskpb: special parsing behaviour for struct.proto types #1227
Comments
The field mask syntax is defined here, and is common across languages: If I follow correctly, you're asking for a change to that syntax. Changes that affect multiple protobuf implementations are out of scope for this repository; you should raise the issue on the general protobuf discussion group. Note that if you just want to add a path to a (Apologies if I misunderstand the change you're looking for.) Edit: Fixed link to the field mask syntax. |
It sounds like you want a |
Yeah, definitely sounds like a wider-discussion sort of thing. |
I think I agree, this definitely conflates JSON and general field mask behaviour. Thanks for your thoughts on the topic, I'll put something out on the general protobuf discussion group, since I still think this would be a valuable addition. |
I created a discussion on the protobuf mailing list: https://groups.google.com/g/protobuf/c/Lwm3X-uokBc. |
Is your feature request related to a problem? Please describe.
The grpc-gateway needs to be able to parse incoming JSON and generate a field mask from it. This works fine for most types, but specifically for the generic types
google.protobuf.Struct
andgoogle.protobuf.Value
, the existingfieldmaskpb.New
and.Append
behaviour does not allow generic uses of these types. We cannot use the fieldmask helpers in the grpc-gateway until this is supported.For example, given a field named
struct_field
with a typegoogle.protobuf.Struct
and the incoming JSON:We would like to produce a
paths
slice that looks like:Describe the solution you'd like
I'd like there to be a special case for these generic, well known types only, in the behaviour of the fieldmask helpers.
Describe alternatives you've considered
Keeping our own home grown field mask generation and validation logic.
Additional context
See here for our current field mask generation logic.
The text was updated successfully, but these errors were encountered: