Skip to content

Fix inheritable system model replacements#10790

Draft
live1206 wants to merge 1 commit into
microsoft:mainfrom
live1206:fix/inheritable-system-model-replacements
Draft

Fix inheritable system model replacements#10790
live1206 wants to merge 1 commit into
microsoft:mainfrom
live1206:fix/inheritable-system-model-replacements

Conversation

@live1206
Copy link
Copy Markdown
Contributor

Fixes #10787

Summary

  • add first-class support for inheritable SystemObjectModelProvider replacements
  • dedupe derived model properties by serialized wire name when a system base owns the property
  • preserve system provider identity through visitor Update(...) calls
  • register system providers by their wrapped framework type and skip model factory methods for them

Validation

  • dotnet test packages\http-client-csharp\generator\Microsoft.TypeSpec.Generator\test\Microsoft.TypeSpec.Generator.Tests.csproj --filter "FullyQualifiedName~SystemObjectModelProviderTests|FullyQualifiedName~ModelFactoryProviderTests.SkipSystemObjectModelProvider" --no-restore
  • npm ci && npm run build in packages\http-client-csharp
  • npm run test:generator in packages\http-client-csharp
  • npm test in packages\http-client-csharp

Fixes microsoft#10787

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@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 May 26, 2026
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 26, 2026

Open in StackBlitz

npm i https://pkg.pr.new/@typespec/http-client-csharp@10790

commit: 3449fb3

@github-actions
Copy link
Copy Markdown
Contributor

No changes needing a change description found.

@live1206 live1206 marked this pull request as draft May 26, 2026 05:54
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.

C# generator should fully support inheritable system model replacements

1 participant