tsp - Add clientname support for body parameter #1518
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
convertor.ts
to usegetClientNameOverride
for body parameters, ensuring that client-specific naming conventions are respected.modelUtils.ts
to utilizegetClientNameOverride
for models, improving consistency in client-facing names.Schema generation enhancements
modelUtils.ts
to correctly process record models named "Record", ensuring accurate schema output for these cases.Dependency and import updates
getClientNameOverride
to imports from@azure-tools/typespec-client-generator-core
inmodelUtils.ts
, enabling the new naming logic.Test directory cleanup
.gitignore
intests-emitter/AppComplianceAutomation.Management/target
andtests-emitter/Sphere.Management/target
, streamlining test output management.