Commit 91b92c2
Add enhanced XML documentation to MPG generator operation methods (#53473)
* Initial plan
* Add enhanced XML documentation to MPG generator methods
Co-authored-by: live1206 <[email protected]>
* Document XML encoding limitation in code comments
Co-authored-by: live1206 <[email protected]>
* Use XmlDocStatement to build structured XML documentation
Instead of using FormattableString with raw XML tags that get HTML-encoded,
now using XmlDocStatement API to construct structured XML documentation.
This ensures proper XML rendering without encoding issues.
- Created BuildEnhancedXmlDocs method that constructs XmlDocStatement objects
- Builds list with items for Request Path, Operation Id, API Version, and Resource
- Uses XmlDocSummaryStatement to properly wrap the summary content
- XmlDocs.Update() is called to update the summary with structured statements
This addresses the reviewer's feedback to use XmlDocStatement construction.
Co-authored-by: live1206 <[email protected]>
* Regenerate test projects with proper XML documentation
After merging main branch and resolving conflicts, regenerated all test projects
to reflect the updated generator changes. The XML documentation now uses proper
XmlDocStatement construction, resulting in correctly formatted XML tags instead
of HTML-encoded entities.
Generated documentation now properly shows:
- <list type="bullet"> instead of <list type="bullet">
- <item>, <term>, <description> tags without encoding
- Properly formatted operation metadata (Request Path, Operation Id, API Version, Resource)
Co-authored-by: live1206 <[email protected]>
* Remove dead code and simplify BuildEnhancedXmlDocs
- Removed BuildEnhancedDescription method which was a no-op
- Changed line 87 to use original assignment: _description = description ?? _convenienceMethod.Signature.Description
- Changed BuildEnhancedXmlDocs return type from XmlDocProvider? to void since return value is not used
- Simplified method by directly updating existingXmlDocs instead of returning it
Addresses reviewer feedback to remove redundant code.
Co-authored-by: live1206 <[email protected]>
---------
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: live1206 <[email protected]>1 parent 1e49655 commit 91b92c2
File tree
25 files changed
+2462
-129
lines changed- eng/packages/http-client-csharp-mgmt/generator
- Azure.Generator.Management/src/Providers/OperationMethodProviders
- TestProjects/Local/Mgmt-TypeSpec/src/Generated
- Extensions
25 files changed
+2462
-129
lines changedLines changed: 70 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
95 | 96 | | |
96 | 97 | | |
97 | 98 | | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
98 | 158 | | |
99 | 159 | | |
100 | 160 | | |
| |||
131 | 191 | | |
132 | 192 | | |
133 | 193 | | |
134 | | - | |
| 194 | + | |
135 | 195 | | |
136 | 196 | | |
137 | 197 | | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
138 | 207 | | |
139 | 208 | | |
140 | 209 | | |
| |||
Lines changed: 136 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments