Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 19, 2025

Contributing to the Azure SDK

Please see our CONTRIBUTING.md if you are not familiar with contributing to this repository or have questions.

For specific information about pull request etiquette and best practices, see this section.

Description

The Management Generator was adding unwanted formatting to XML documentation tags, creating unnecessary diffs against existing code:

Before:

/// <description> /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}... . </description>
/// <description> Bars_Get. </description>

After:

/// <description>/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}...</description>
/// <description>Bars_Get</description>

Changes

  • Modified XmlDocStatement constructor calls in ResourceHelpers.cs to use explicit opening/closing tags instead of tag names, preventing automatic sentence-style formatting
  • Updated 4 locations: Request Path, Operation Id, Default Api Version, and Resource descriptions

Changed from:

new XmlDocStatement("description", [$"{value}"])

To:

new XmlDocStatement($"<description>", $"</description>", [$"{value}"])

This matches the existing pattern used for <list> tags in the same file.

Original prompt

This section details on the original issue you should resolve

<issue_title>The MTG generated doc has extra space and period</issue_title>
<issue_description>As the following pic shows, https://github.com/Azure/azure-sdk-for-net/tree/main/eng/packages/http-client-csharp-mgmt/generator (MTG) generated code has extra space and period, which introduce unnecessary diff between the existing code and code generated by MTG, it's better to remove the extra space and period

Image</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Modified XmlDocStatement constructor calls in ResourceHelpers.cs to use explicit opening/closing tags instead of tag names, preventing automatic formatting that adds unwanted spaces and periods.

Co-authored-by: haiyuazhang <[email protected]>
Copilot AI changed the title [WIP] Fix extra space and period in MTG generated doc Fix MTG generator adding extra spaces and periods in XML documentation Nov 19, 2025
Copilot finished work on behalf of haiyuazhang November 19, 2025 01:04
Copilot AI requested a review from haiyuazhang November 19, 2025 01:04
@haiyuazhang
Copy link
Member

@copilot you can close the PR

Copy link
Contributor Author

Copilot AI commented Nov 19, 2025

@copilot you can close the PR

I don't have the ability to close pull requests. You'll need to close it yourself or have a repository maintainer do so. If you'd like me to revert the changes first, please let me know.

Copilot finished work on behalf of haiyuazhang November 19, 2025 02:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The MTG generated doc has extra space and period

2 participants