[http-client-csharp] Preserve cref tags in parameter docs - #11792
Merged
Conversation
nightcityblade
requested review from
JoshLove-msft,
Jorge Rangel (jorgerangel-msft),
Jose Arriaga Maldonado (joseharriaga),
Jesse Squire (jsquire) and
m-nash
as code owners
August 30, 2026 15:31
|
Azure Pipelines: Successfully started running 1 pipeline(s). 1 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a regression in the C# HTTP client generator where XML <param> documentation was being flattened to plain text, causing <see cref="..."/> references to be silently dropped when reading docs back from symbols (e.g., via last-contract views).
Changes:
- Updates parameter XML doc extraction to reuse the existing structured XML content processing (instead of
XElement.Value), preserving<see cref="..."/>tags while keeping the existingT:prefix cleanup behavior. - Adds a regression test to validate that parameter docs retain
<see cref="..."/>content after round-tripping through symbol XML docs.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/src/Providers/NamedTypeSymbolProvider.cs | Routes <param> doc extraction through ProcessXmlContent so <see cref="..."/> tags are preserved. |
| packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/test/Providers/NamedTypeSymbolProviders/XmlDocsTests.cs | Adds a regression test ensuring parameter descriptions keep <see cref="..."/> references and type-prefix cleanup. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
commit: |
Contributor
|
No changes needing a change description found. |
Jorge Rangel (jorgerangel-msft)
approved these changes
Aug 31, 2026
JoshLove-msft
approved these changes
Sep 3, 2026
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.
Fixes #11768
Summary
XElement.Value<see cref="..."/>references while retaining the existing type-prefix cleanupmainwith missing type references and passes with the fixTesting
dotnet test packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/test/Microsoft.TypeSpec.Generator.Tests.csproj --no-restore --filter FullyQualifiedName~NamedTypeSymbolProviders --nologo(78 passed)dotnet format packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.sln whitespace --verify-no-changes --no-restore --include packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/src/Providers/NamedTypeSymbolProvider.cs packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/test/Providers/NamedTypeSymbolProviders/XmlDocsTests.cs --verbosity minimalgit diff --check