-
Notifications
You must be signed in to change notification settings - Fork 235
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
Comments
Based on the e2e experiment in #5651, the user can implement an empty client in TypeSpec and MGC still generates it. The criteria of an empty client:
|
This can be closed in favor of an issue to TCGC requesting that namespaces with no operations and no subclients are filtered out. Interfaces without operations should still be included because in that case the customer is explicitly defining the interface, whereas for namespaces they may be defining a models-only namespace in which case a client is unnecessary. |
From the doc of interface in TyepSpec.
@JoshLove-msft Could you help me understand why an empty interface without operation should be included? |
This falls into the "garbage in, garbage out" bucket - the user is explicitly defining an empty interface. We should give them what they asked for. |
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.
The text was updated successfully, but these errors were encountered: