Skip to content
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

AIP-122: lint for collection identifier segments being the plural form of the noun #1124

Open
toumorokoshi opened this issue Mar 17, 2023 · 1 comment

Comments

@toumorokoshi
Copy link
Contributor

AIP-122 states:

The collection identifier segments in a resource name must be the plural form of the noun used for the resource. (For example, a collection of Publisher resources is called publishers in the resource name.)

We should add a linter rule that validates this (there might be one, but I couldn't find one looking through 12* AIPs.

@toumorokoshi
Copy link
Contributor Author

note: we can't really do this as there is guidance in the AIPs today that allow nested collections to have names that elide some of the name if it's already present in the parent:

https://google.aip.dev/122#collection-identifiers

If a resource name contains multiple levels of a hierarchy, and a parent collection's name is used as a prefix for the child resource's name, the child collection's name may omit the prefix.

So it's not possible to rely on this heuristic today.

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

No branches or pull requests

1 participant