Skip to content
This repository was archived by the owner on Aug 25, 2026. It is now read-only.
This repository was archived by the owner on Aug 25, 2026. It is now read-only.

Resources referenced by name but not used directly generate helper methods #637

Description

@software-dov

Consider the following:

message Squid {
  option (google.api.resource) = {
    type: "animalia.cephalopoda.com/Squid"
    pattern: "zones/{zone}/squids/{squid}"
  };
  string name = 1;
}

message CreateSquidRequest {
  string name = 1 {
    (google.api.resource_reference) = {
      type: "animalia.cephalopoda.com/Squid"
    }
  };
}

message CreateSquidResponse {}

service SquidService {
  rpc CreateSquid(CreateSquidResponse) returns CreateSquidResponse {
    option (google.api.method_signature) = "name";
  }
}

The Squid resource is never directly referenced as an input or output message type or one of their fields, but we still want to generate resource helper methods for Squid.

Tracking issue for following resource_reference annotations in fields.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

priority: p2Moderately-important priority. Fix may not be included in next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions