googleapis / api-linter

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

fix(AIP-123): multiword singleton reduction #1417

Closed noahdietz closed 3 months ago

noahdietz commented 3 months ago

There was a bug in resource-pattern-singular for the multi-word nested name reduction singleton case caused by not converting the snake_case value from the nestedName helper into lowerCamelCase - it was comparing a lowerCamelCase pattern suffix against a snake_case expected value.

Added a bunch more tests specifically using a type name with more than two words for extended matching.

Internal bug report: http://b/359848757