这是indexloc提供的服务,不要输入任何密码
Skip to content

AIP-161: Field masks currently do not support proper maps validation #249

@christian-roggia

Description

@christian-roggia

Field masks may permit the specification of specific fields in a map, if and only if the map's keys are either strings or integers, using the . character for traversal.

Field masks should support string keys that contain characters that are problematic for the field mask syntax, using the backtick character.

  // The name of the book.
  // Format: publishers/{publisher}/books/{book}
  string name = 1;

  // Reviews for the back cover. The key is the author of the review,
  // and the value is the text of the review.
  //
  // Valid field masks: reviews, reviews.smith, reviews.`John Smith`
  map<string, string> reviews = 2;
}```

This is currently not supported by the package: providing a field mask that the specifies reviews.`John Smith` or reviews.smith among the paths will result in a validation error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions