Skip to content

fix the empty client issue #7160

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

Merged
merged 6 commits into from
Apr 30, 2025

Conversation

ArcturusZhang
Copy link
Member

@ArcturusZhang ArcturusZhang commented Apr 29, 2025

There are some RPs that are "models only RP", which contains no operations but only models.
Such as we have in azure: Azure.Messaging.EventGrid.SystemEvents.

There was an update in TCGC 0.54.1, now no client is returned from TCGC's output.
And long time ago, we made an update in our emitter to error out when there is no client in TCGC's output.
When these two combined, we get errors when generating Azure.Messaging.EventGrid.SystemEvents.

I think it is not quite reasonable that we give the user an error when there is no client - a generator should work fine if they just want to generate the models.
Therefore this PR is changing that to a warning, and we still return a reasonable code model when there is no client.

@microsoft-github-policy-service microsoft-github-policy-service bot added the emitter:client:csharp Issue for the C# client emitter: @typespec/http-client-csharp label Apr 29, 2025
Copy link
Contributor

No changes needing a change description found.

@azure-sdk
Copy link
Collaborator

API change check

API changes are not detected in this pull request.

@ArcturusZhang ArcturusZhang marked this pull request as ready for review April 29, 2025 08:45
@ArcturusZhang ArcturusZhang enabled auto-merge April 30, 2025 02:46
@ArcturusZhang ArcturusZhang added this pull request to the merge queue Apr 30, 2025
Merged via the queue into microsoft:main with commit 9361ea9 Apr 30, 2025
21 checks passed
@ArcturusZhang ArcturusZhang deleted the fix-empty-client-issue branch April 30, 2025 04:19
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 this pull request may close these issues.

4 participants