Skip to content

Conversation

@bshaffer
Copy link

These are fixes that were required for the PHP client libraries to build. Notably they:

  • remove "nested" references from method_signature annotations
  • use standard paths for resource.pattern
  • uses repeated instead of map for pagination

@bshaffer bshaffer requested review from a team as code owners April 29, 2025 00:40

message PagedExpandLegacyMappedResponse {
// The words that were expanded, indexed by their initial character.
// (-- aip.dev/not-precedent: This is a legacy, non-standard pattern that violates
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we want to remove this. GCE uses this type of "mapped-paged" response in several RPCs, which is why this RPC was put in Showcase. How does PHP handle building the GCE GAPIC?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's interesting, I don't think we handle map for pagination in GCE. That may be a bug on our end.

Would you be able to point to an example in the protos (or in a doc) where this exists and how we should be handling it?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The error message seems to imply this is legacy and non-standard, which is probably why we don't support it

post: "/v1beta1/users"
body: "*"
};
option (google.api.method_signature) = "user.display_name,user.email";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are legitimate method signatures. See https://google.aip.dev/client-libraries/4232#method-signatures_1 :

  • If a field's name contains a period (.) character, this indicates a nested field.
  • An RPC can provide this annotation more than once to specify multiple signatures. Order matters here

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we handle this in the PHP generator either, and it seems like we should (if it's an AIP). However, it's interesting that this hasn't caused issues to us, so I'd guess in practice it isn't being used.

pattern: "users/{user}/blurbs/{blurb}"
pattern: "rooms/{room}/blurbs/{blurb}"
pattern: "rooms/{room}/blurbs/legacy/{legacy_room}.{blurb}"
pattern: "rooms/{room}/legacy_room/{legacy_room}/blurbs/{blurb}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are these modified/added resource names needed? (I'll need to understand resource names more deeply in general.)

Copy link
Author

@bshaffer bshaffer Jul 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just know they fail when we build them in the format you've provided here. I also don't know enough about them to say if they're valid, but I am assuming they aren't (since PHP's generator works on all the other APIs but this one)

cc @noahdietz who may know more about these

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