Skip to content

tsp - Add clientname support for body parameter#1518

Merged
dolauli merged 1 commit into
Azure:mainfrom
dolauli:tsp-brown
Sep 12, 2025
Merged

tsp - Add clientname support for body parameter#1518
dolauli merged 1 commit into
Azure:mainfrom
dolauli:tsp-brown

Conversation

@dolauli

@dolauli dolauli commented Sep 12, 2025

Copy link
Copy Markdown
Contributor

This pull request introduces enhancements to the PowerShell TypeSpec converter, primarily focusing on improving client name handling and schema generation, along with minor cleanup in test directories. The most significant changes involve using client name overrides for parameters and models, refining schema generation for union and record types, and updating imports to support these features.

Client name override improvements

  • Updated parameter creation in convertor.ts to use getClientNameOverride for body parameters, ensuring that client-specific naming conventions are respected.
  • Enhanced model schema generation in modelUtils.ts to utilize getClientNameOverride for models, improving consistency in client-facing names.

Schema generation enhancements

  • Improved union type schema handling in modelUtils.ts to correctly process record models named "Record", ensuring accurate schema output for these cases.

Dependency and import updates

  • Added getClientNameOverride to imports from @azure-tools/typespec-client-generator-core in modelUtils.ts, enabling the new naming logic.

Test directory cleanup

  • Removed unnecessary files and patterns from .gitignore in tests-emitter/AppComplianceAutomation.Management/target and tests-emitter/Sphere.Management/target, streamlining test output management.

@dolauli
dolauli merged commit 43d095c into Azure:main Sep 12, 2025
100 of 103 checks passed
@dolauli
dolauli deleted the tsp-brown branch September 12, 2025 12:18
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.

1 participant