File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -99,11 +99,28 @@ An API **should** use the less-redundant form:
9999users/vhugo1802/events/birthday-dinner-226
100100```
101101
102- In this situation, the _ message_ is still called ` UserEvent ` ; only the resource
103- name is shortened.
102+ In this situation, the _ message_ and _ resource type_ are still called
103+ ` UserEvent ` ; only the collection and resource identifiers in the pattern(s) are
104+ shortened. Since the _ resource type_ is not shortened, the ` singular ` and
105+ ` plural ` are similarly _ not shortened_ .
106+
107+ ```
108+ message UserEvent {
109+ option (google.api.resource) = {
110+ type: "example.googleapis.com/UserEvent"
111+ // Only the collection & resource identfiers in the `pattern` are shortened.
112+ pattern: "projects/{project}/users/{user}/events/{event}"
113+ singular: "userEvent"
114+ plural: "userEvents"
115+ };
116+
117+ string name = 1;
118+ }
119+ ```
104120
105121** Note:** APIs wishing to do this ** must** follow this format consistently
106- throughout the API, or else not at all.
122+ throughout all of its ` pattern ` entries defined and anywhere else the
123+ resource is referenced in the API, or else not at all.
107124
108125### Resource ID segments
109126
@@ -357,6 +374,8 @@ isolation of logical concerns per-resource.
357374
358375## Changelog
359376
377+ - ** 2024-06-14** : Clarify resource annotation shortening rules for nested
378+ collections.
360379- ** 2023-09-19** : Prohibit duplicate collection identifiers.
361380- ** 2023-09-01** : Add a clause that allows embedding for revision resource
362381 messages.
You can’t perform that action at this time.
0 commit comments