Skip to content

Create shared helper module for tsp-client commands#12057

Merged
samvaity merged 1 commit into
mainfrom
tsp-client-helper
Sep 12, 2025
Merged

Create shared helper module for tsp-client commands#12057
samvaity merged 1 commit into
mainfrom
tsp-client-helper

Conversation

@samvaity
Copy link
Copy Markdown
Member

Created shared helpers for tsp-client commands (common utility class used by multiple tools) so they provide single implementation of core logic

  • Looser coupling (for multiple tool calls to use)
  • Clear separation of “UI” (CLI command) vs logic

Will add update workflow in a follow-up PR, which will include details with the TspClientUpdate Tooling (it was increasing the size of PR)

@github-actions github-actions Bot added the azsdk-cli Issues related to Azure/azure-sdk-tools::tools/azsdk-cli label Sep 11, 2025
@samvaity samvaity marked this pull request as ready for review September 12, 2025 18:10
Copilot AI review requested due to automatic review settings September 12, 2025 18:10
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 creates a shared helper module for tsp-client commands to improve code reusability and separation of concerns between CLI commands and business logic.

  • Extracts common tsp-client convert logic into TspClientHelper with dependency injection
  • Refactors TypeSpecConvertTool to use the new helper instead of duplicating convert logic
  • Updates service registration and test files to accommodate the new dependency

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
TspConvertTool.cs Removes duplicate convert logic and delegates to the new TspClientHelper
ServiceRegistrations.cs Registers the new ITspClientHelper service for dependency injection
TspClientHelper.cs New helper class implementing the shared tsp-client convert functionality
ITspClientHelper.cs Interface defining the contract for tsp-client operations
TspConvertToolTest.cs Updates test constructor calls to include the new dependency

Comment thread tools/azsdk-cli/Azure.Sdk.Tools.Cli/Helpers/TspClientHelper.cs
@samvaity samvaity self-assigned this Sep 12, 2025
@samvaity samvaity merged commit 06d5da6 into main Sep 12, 2025
23 checks passed
@samvaity samvaity deleted the tsp-client-helper branch September 12, 2025 18:39
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.

4 participants