fix the empty client issue #7160
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.