Skip to content

Fix language name issue when generating SDK from copilot#11972

Merged
praveenkuttappan merged 4 commits into
Azure:mainfrom
praveenkuttappan:fix_language_name_issue
Sep 5, 2025
Merged

Fix language name issue when generating SDK from copilot#11972
praveenkuttappan merged 4 commits into
Azure:mainfrom
praveenkuttappan:fix_language_name_issue

Conversation

@praveenkuttappan
Copy link
Copy Markdown
Member

Add a sanitizer helper class to sanitize language name. I have found an issue when agent says generate SDK for csharp and three is no pipeline to support it or sometimes it says language is Dotnet

Copilot AI review requested due to automatic review settings September 4, 2025 21:23
@praveenkuttappan praveenkuttappan self-assigned this Sep 4, 2025
@github-actions github-actions Bot added the azsdk-cli Issues related to Azure/azure-sdk-tools::tools/azsdk-cli label Sep 4, 2025
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds input sanitization for language names in SDK generation to handle inconsistent language identifiers from the copilot agent. The solution creates a sanitizer helper class that normalizes language names like "csharp" and "Dotnet" to their expected pipeline values.

Key Changes:

  • Added InputSanitizer helper class with language name normalization
  • Integrated sanitizer into the SpecWorkflowTool to process language input before SDK generation
  • Registered the sanitizer service in the dependency injection container

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
InputSanitizer.cs New helper class that normalizes language names using a switch expression
SpecWorkflowTool.cs Updated constructor to inject sanitizer and added language sanitization before validation
ServiceRegistrations.cs Registered the new InputSanitizer service as a singleton

Comment thread tools/azsdk-cli/Azure.Sdk.Tools.Cli/Helpers/InputSanitizer.cs
Comment thread tools/azsdk-cli/Azure.Sdk.Tools.Cli/Helpers/InputSanitizer.cs
@praveenkuttappan praveenkuttappan merged commit dca7991 into Azure:main Sep 5, 2025
13 checks passed
@praveenkuttappan praveenkuttappan deleted the fix_language_name_issue branch September 5, 2025 00:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

azsdk-cli Issues related to Azure/azure-sdk-tools::tools/azsdk-cli

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants