Skip to content

Conversation

noahdietz
Copy link
Collaborator

@noahdietz noahdietz commented Jul 14, 2025

The core::0136::response-message-name rule uses a heursitic to verify and account for the target resource type being the response type of the custom method (rather than a message type that aligns with the RPC name). It did this by checking for a name field with a resource_reference annotation and comparing the type there to the type of a google.api.resource annotation on the response to see if they matched. However, some AIPs recommend using a resource-singular-aligned field name in the request message e.g. the AIP-144 Add/Remove methods. So rather than AddAuthor, which returns a Book, checking for a name field, it will check for a book field as well and use that allow the custom method response type to be a Book rather than AddAuthorResponse.

This still prefers name if present in addition to a resource-singular-aligned field.

Internal bug http://b/424243407

@noahdietz noahdietz requested a review from a team as a code owner July 14, 2025 21:53
@noahdietz noahdietz requested a review from quirogas July 14, 2025 21:53
@noahdietz noahdietz merged commit 8dec010 into googleapis:main Jul 14, 2025
5 checks passed
@noahdietz noahdietz deleted the aip-136-resource-singular-response-msg branch July 14, 2025 22:19
gcf-merge-on-green bot pushed a commit that referenced this pull request Jul 16, 2025
🤖 I have created a release *beep* *boop*
---


## [1.70.0](https://togithub.com/googleapis/api-linter/compare/v1.69.2...v1.70.0) (2025-07-16)


### Features

* **AIP-142:** add relative time segments comment rule ([5fab299](https://togithub.com/googleapis/api-linter/commit/5fab2997d1f81bf60b55c6ae6e3e3605212c9870))
* **AIP-142:** add time_offset type rule ([#1506](https://togithub.com/googleapis/api-linter/issues/1506)) ([945cff3](https://togithub.com/googleapis/api-linter/commit/945cff325fe38d4f8e3a7a620059a1e6b04c5107))
* **integration-tests:** add test harness for cli invocation ([#1493](https://togithub.com/googleapis/api-linter/issues/1493)) ([35be28f](https://togithub.com/googleapis/api-linter/commit/35be28f922581bff1f8ad6d2bb9289f6c57e2657))


### Bug Fixes

* **AIP-136:** support response msg lint with resource singular aligned field name ([#1499](https://togithub.com/googleapis/api-linter/issues/1499)) ([8dec010](https://togithub.com/googleapis/api-linter/commit/8dec01076c4bbeb0506c39610e325fc25bbda6ca))
* **AIP-158:** clarify pluralized response field finding ([#1498](https://togithub.com/googleapis/api-linter/issues/1498)) ([f0b7895](https://togithub.com/googleapis/api-linter/commit/f0b7895da8cd4b437ac0c3a9be2ac442560eeda8))
* **AIP-203:** field-behavior-required ignore imported request types ([#1504](https://togithub.com/googleapis/api-linter/issues/1504)) ([bb82f00](https://togithub.com/googleapis/api-linter/commit/bb82f006b37c85cf255ba8bddb1bf34a07993596)), refs [#1503](https://togithub.com/googleapis/api-linter/issues/1503)
* **cli:** unexpected lint warning when providing multiple files ([#1496](https://togithub.com/googleapis/api-linter/issues/1496)) ([7ecaa42](https://togithub.com/googleapis/api-linter/commit/7ecaa4200da7b5cbcbf1c273fc77d524f346ae1c)), refs [#1465](https://togithub.com/googleapis/api-linter/issues/1465)


### Documentation

* add comments to lint.Config and configuration page ([#1505](https://togithub.com/googleapis/api-linter/issues/1505)) ([39d0376](https://togithub.com/googleapis/api-linter/commit/39d0376281fb03f57b24efe0d82cb842e7316615))

---
This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please).
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