googleapis / api-linter

A linter for APIs defined in protocol buffers.
https://linter.aip.dev/
Apache License 2.0
577 stars 139 forks source link

AIP-123: Handling of names for nested collections only considers immediate parent #1424

Open SanjayVas opened 2 weeks ago

SanjayVas commented 2 weeks ago

This is for core::0123::resource-pattern-singular and core::0123::resource-pattern-plural, and how AIP-123 interacts with affordance for nested collections in AIP-122.

I'm not entirely certain whether this is just a linter problem or also needs clarification in AIP-122. The basic issue is that the handling of nested collections only considers the parent, rather than all ancestors. e.g. if you have a top-level collection users, you should be able to shorten the pattern for any descendant resource type starting with User.

See #1408 and #1403.

noahdietz commented 2 weeks ago

Thanks for the feedback, I think this does need clarification in AIP-122 as you suggest. I don't want to mark this as a bug since it implemented what the guidance suggested, though the guidance is incomplete. It's a discussion worth having, but one that should be done around the guidance rather than the linter.