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

Provide an API for non resource operations #1846

Open
Tracked by #1850
pshao25 opened this issue Nov 12, 2024 · 2 comments
Open
Tracked by #1850

Provide an API for non resource operations #1846

pshao25 opened this issue Nov 12, 2024 · 2 comments
Assignees

Comments

@pshao25
Copy link
Member

pshao25 commented Nov 12, 2024

Following up the design for multi path issue and the API getArmResources it provides, we also need an API for the rest operations which are not resource operations.

@markcowl
Copy link
Member

markcowl commented Nov 13, 2024

@pshao25 Let's discuss. Other than provider actions, non-resource operations should be modeled using Azure.Core or low-level http operations.

@pshao25
Copy link
Member Author

pshao25 commented Nov 14, 2024

I'm thinking from SDK perspective, assume we now have getAllOperations from TCGC, resolveArmResources from TypeSpec library. We have to do below to filter out all the resource operations when generating all the non-resource operations. It's inconvenient.

foreach (operation in getAllOperations()) {
  if (operation in resolveArmResources().AllOperations) continue;
  else /* generate this operation */
}

It's better if we have some API called getNonResourceOperations, then we could do

foreach (operation in getNonResourceOperations()) {
  /* generate this operation */
}

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

No branches or pull requests

2 participants