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

feat(AIP-123): resource collection matches plural #1408

Merged
merged 6 commits into from
Jul 26, 2024

Conversation

noahdietz
Copy link
Collaborator

Lint for the plural appearing as the collection segment in resource patterns. Special handling for nested resource collections that potentially stutter with the pattern, affording a reduced collection segment in the pattern. See #1403 for more details.

The nested plural form is derived in a round about way where we check to see if the parent resource singular (via the resource ID segment) is a prefix of the child collection segment. We use the parent singular because the child plural wouldn't use the parent plural as the prefix in a "compound"/nested name, it would use the parent singular. This prefix is trimmed if it matches, leaving a reduced child collection name that is already pluralized.

For internal bug http://b/343466943

@noahdietz noahdietz requested a review from a team as a code owner July 25, 2024 23:39
@noahdietz noahdietz requested a review from slevenick July 25, 2024 23:41
@noahdietz noahdietz added the automerge Summon MOG for automerging label Jul 26, 2024
@gcf-merge-on-green gcf-merge-on-green bot merged commit 9025d3d into googleapis:main Jul 26, 2024
6 checks passed
@gcf-merge-on-green gcf-merge-on-green bot removed the automerge Summon MOG for automerging label Jul 26, 2024
@noahdietz noahdietz deleted the aip-123-plural-variable branch July 26, 2024 17:46
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.

2 participants