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

Generator is not generating all the root level resources in the proto files #3475

Open
lqiu96 opened this issue Dec 18, 2024 · 0 comments
Open
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@lqiu96
Copy link
Contributor

lqiu96 commented Dec 18, 2024

See this and the earlier comments in the thread for more context.

Given two top level resources added to the proto file:

option (google.api.resource_definition) = {
  type: "service.googleapis.com/FolderLocation"
  pattern: "folders/{folder}/locations/{location}"
};

option (google.api.resource_definition) = {
  type: "service.googleapis.com/OrganizationLocation"
  pattern: "organizations/{organization}/locations/{location}"
};

It seems to only generate a resource for FolderLocation as FolderLocationName.

These resource definitions are the parent to a child resource:

message ChildResource {
  option (google.api.resource) = {
    type: "service.googleapis.com/ChildResource"
    pattern: "organizations/{organization}/locations/{location}/things/{thing}"
    pattern: "folders/{folder}/locations/{location}/things/{thing}"
    plural: "childResource"
    singular: "childResource"
  };
}

These should map properly to the the two top level resource definitions, but it only seems to map to one.

We need to investigate why only one of these resources is being created.

@lqiu96 lqiu96 added type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. priority: p2 Moderately-important priority. Fix may not be included in next release. labels Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

1 participant