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-136: custom methods should use parent or name #1089

Closed
toumorokoshi opened this issue May 4, 2023 · 0 comments · Fixed by #1093
Closed

AIP-136: custom methods should use parent or name #1089

toumorokoshi opened this issue May 4, 2023 · 0 comments · Fixed by #1093

Comments

@toumorokoshi
Copy link
Contributor

an example from AIP-136 reads:

rpc SortBooks(SortBooksRequest) returns (SortBooksResponse) {
  option (google.api.http) = {
    post: "/v1/{publisher=publishers/*}/books:sort"
    body: "*"
  };
}

instead of publisher, it should be one of the canonical name or parent, depending on the case. In this case it's parent, since it's referring to a collection-level operation.

Note we also need linter rules for ensuring only parent/name in the http path.

@toumorokoshi toumorokoshi added this to the gcp-strict-aips milestone May 4, 2023
toumorokoshi added a commit to toumorokoshi/google.aip.dev that referenced this issue May 9, 2023
Further explanation for the rationale is in the changes for AIP-136.

fixes aip-dev#1089
toumorokoshi added a commit to toumorokoshi/google.aip.dev that referenced this issue May 9, 2023
The resource singular is a harder pattern to recognize as it
requires a consumer to know the resource singular beforehand. Using
parent aligns it with other collection-oriented methods.

Further explanation for the rationale is in the changes for AIP-136.

fixes aip-dev#1089
toumorokoshi added a commit that referenced this issue May 10, 2023
The resource singular is a harder pattern to recognize as it
requires a consumer to know the resource singular beforehand. Using
parent aligns it with other collection-oriented methods.

Further explanation for the rationale is in the changes for AIP-136.

fixes #1089
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 a pull request may close this issue.

1 participant