You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AIP-122 outlines how a resource should refer to another resource in its own message definition, using a string field representing the other resource's name, with a google.api.resource_reference annotation to document the format.
It does not, however, call out the anti-pattern of embedding a resource reference as message type field. For example:
messagePublisher {
option(google.api.resource)= {
// ...
};
// ...// Authors associated with the Publisher, where Author is also a resource.repeatedAuthorsauthors=2;
}
AIP-122 outlines how a resource should refer to another resource in its own message definition, using a
string
field representing the other resource's name, with agoogle.api.resource_reference
annotation to document the format.It does not, however, call out the anti-pattern of embedding a resource reference as message type field. For example:
Instead, the field should be:
I propose that AIP-122 should call out this anti-pattern and correction explicitly.
The text was updated successfully, but these errors were encountered: