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

Rescope empty client suppression #5624

Open
JoshLove-msft opened this issue Jan 15, 2025 · 1 comment · May be fixed by #5652
Open

Rescope empty client suppression #5624

JoshLove-msft opened this issue Jan 15, 2025 · 1 comment · May be fixed by #5652
Assignees
Labels
emitter:client:csharp Issue for the C# client emitter: @typespec/http-client-csharp

Comments

@JoshLove-msft
Copy link
Contributor

In #5218, we implemented logic to skip the generation of clients with no public methods. This has the side effect of preventing customers who customize all client methods from using the helper methods, fields, and properties that would be generated in the client. Since we were implementing this for a very specific known case involving ARM subclients, we should rescope the solution so that we apply it via the ArmVisitor in the Azure Plugin.

@live1206
Copy link
Contributor

Based on the e2e experiment in #5651, the user can implement an empty client in TypeSpec and MGC still generates it.
So, this is not a specific case for Azure plugin only, and then we should skip the empty client generation in MGC as a general behavior.

The criteria of an empty client:

  • There is no operation within InputClient
  • There is no methods in the corresponding sub-clients
  • There is no methods in the corresponding custom code

@live1206 live1206 linked a pull request Jan 17, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
emitter:client:csharp Issue for the C# client emitter: @typespec/http-client-csharp
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants