Skip to content

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

@software-dov

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.

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