Skip to content

Conversation

@Jseph
Copy link

@Jseph Jseph commented Dec 20, 2023

These often cause confusion down the line as the API introduces more concepts.

These often cause confusion down the line as the API introduces more concepts.
@Jseph Jseph requested a review from a team as a code owner December 20, 2023 23:33
Note: the date will need to be updated if this is merged.
Fix Typo
Copy link
Collaborator

@noahdietz noahdietz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you also add a quick blurb in a Rationale sub-section? Something like ### Overly generic type names

@noahdietz noahdietz requested review from andrei-scripniciuc and removed request for itsStrobe December 20, 2023 23:48
@Jseph
Copy link
Author

Jseph commented Dec 21, 2023

Added rationale as suggested.

Comment on lines +114 to +120
### Overly Generic Type Names

Overly generic types like `Metadata` or `Resource` will cause confusion as the
API introduces more concepts. Unless the resource represents a
[singleton][aip-156] containing API-level settings, a more specific name should
be used.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In light of the recent guidance to avoid generic resource names,

I recommend providing developers with specific naming conventions for common patterns. For instance, patterns where information is passed as a 'bag' of data, often seen in APIs like:

These patterns typically involve attaching transient(depending of the workflow) data to a resource or tagging for message-passing and webhook consumption. I've encountered this frequently and concur that a standardized terminology would be beneficial. Specifically, distinguishing between two levels of metadata can be crucial:

  • System Metadata: This level is intended for developers and controls system-level workflows. Only programmers should attach data to these objects based on Internal concerns to the service that defined.
  • User-Level Metadata: Allows external clients to append information, enabling control over the flow not just internally but also for client-side processes.

By adopting distinct terms for these levels, we can reduce confusion and enhance the clarity and functionality of our API designs.

I would love to hear your thoughts about the topic and how Google thinks about it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants