Repository navigation
Revert "[http-client-csharp] Rename input-only Content model suffix to Request" - #12513
Closed
JoshLove-msft wants to merge 1 commit into
Closed
JoshLove-msft wants to merge 1 commit into
JoshLove-msft wants to merge 1 commit into
Conversation
…o Reques…" This reverts commit c087652.
JoshLove-msft
requested review from
Alan Zimmer (alzimmermsft),
Jorge Rangel (jorgerangel-msft),
Jose Arriaga Maldonado (joseharriaga) and
m-nash
as code owners
November 6, 2026 21:51
Jorge Rangel (jorgerangel-msft)
approved these changes
Nov 6, 2026
commit: |
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Removing name reservation lets WidgetResponse and WidgetResult collide after the still-enabled Response-to-Result conversion, overwriting a provider and sharing an output filename; collision resolution and regression tests must be retained.
1 open issue
What changed in this PR
Reverts #12493 in the C# client generator, restoring input-only model names ending in Content instead of converting them to Request.
Changes:
- Removes the
Contentsuffix conversion and shared name-collision resolution. - Removes associated tests and fixtures, restoring response-only naming tests.
- Updates naming documentation to describe the reverted behavior.
All paths below are relative to packages/http-client-csharp/generator/.
| File | Description |
|---|---|
Microsoft.TypeSpec.Generator/test/Providers/ModelProviders/TestData/ModelProviderTests/TestBuildName_ResponseSuffixPreservesExistingName/ExistingModels.cs |
Removes existing-name fixtures for Content models. |
Microsoft.TypeSpec.Generator/test/Providers/ModelProviders/TestData/ModelProviderTests/TestBuildName_ResponseSuffixPreservesCustomName/CustomizedModels.cs |
Removes customized Content model fixtures. |
Microsoft.TypeSpec.Generator/test/Providers/ModelProviders/TestData/ModelProviderTests/TestBuildName_ModelSuffixMappingBelongsToOriginalInput/CustomizedModel.cs |
Deletes customization-ownership fixture. |
Microsoft.TypeSpec.Generator/test/Providers/ModelProviders/TestData/ModelProviderTests/TestBuildName_ModelSuffixFallbackAvoidsMappedInputName/CustomizedModel.cs |
Deletes mapped fallback-name fixture. |
Microsoft.TypeSpec.Generator/test/Providers/ModelProviders/TestData/ModelProviderTests/TestBuildName_ModelSuffixCollisionPreservesMappedSuffixName/CustomizedModel.cs |
Deletes mapped suffix-collision fixture. |
Microsoft.TypeSpec.Generator/test/Providers/ModelProviders/TestData/ModelProviderTests/TestBuildName_ModelSuffixCollisionPreservesCustomName/CustomizedModel.cs |
Deletes custom-name collision fixture. |
Microsoft.TypeSpec.Generator/test/Providers/ModelProviders/TestData/ModelProviderTests/TestBuildName_ModelSuffixCollisionPreservesContractName/ExistingModel.cs |
Deletes prior-contract collision fixture. |
Microsoft.TypeSpec.Generator/test/Providers/ModelProviders/ModelProviderTests.cs |
Removes content-renaming and collision tests; restores response-only cases. |
Microsoft.TypeSpec.Generator/src/TypeFactory.cs |
Removes cached model-name resolution and reservations. |
Microsoft.TypeSpec.Generator/src/SourceInput/SourceInputModel.cs |
Removes the customization-mapping lookup helper. |
Microsoft.TypeSpec.Generator/src/Providers/TypeProvider.cs |
Restores instance-only name normalization. |
Microsoft.TypeSpec.Generator/src/Providers/ModelProvider.cs |
Restores response-only suffix conversion and compatibility lookup. |
Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ScmModelProvider/TestData/ScmModelProviderTests/ModelSuffixDoesNotCollideWithCustomizedClient/CustomizedClients.cs |
Deletes customized-client collision fixtures. |
Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ScmModelProvider/TestData/ScmModelProviderTests/ContentSuffixUsageIsReflectedInGeneratedCode(Output).cs |
Deletes output-only model baseline. |
Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ScmModelProvider/TestData/ScmModelProviderTests/ContentSuffixUsageIsReflectedInGeneratedCode(Input).cs |
Deletes input-only model baseline. |
Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ScmModelProvider/TestData/ScmModelProviderTests/ContentSuffixUsageIsReflectedInGeneratedCode(Input, Output).cs |
Deletes shared input/output model baseline. |
Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ScmModelProvider/ScmModelProviderTests.cs |
Removes generated-output and client-collision tests. |
Microsoft.TypeSpec.Generator.ClientModel/src/ScmTypeFactory.cs |
Removes client-name reservations for model naming. |
Microsoft.TypeSpec.Generator.ClientModel/src/Providers/ClientProvider.cs |
Removes the client collision-name helper. |
docs/naming-conventions.md |
Removes content-renaming and collision-resolution documentation. |
Review effort: Balanced
| } | ||
|
|
||
| return name; | ||
| return $"{normalizedName[..^ResponseSuffix.Length]}Result"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

Reverts #12493