[http-client-csharp] Preserve cref tags in parameter docs - #11792
[http-client-csharp] Preserve cref tags in parameter docs#11792nightcityblade wants to merge 1 commit into
Conversation
|
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. |
|
nightcityblade please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
1 similar comment
|
nightcityblade please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
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: |
|
No changes needing a change description found. |
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