Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/typespec-powershell/src/convertor/convertor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ function resolveOperationId(psContext: SdkContext, op: HttpOperation): string {
}

function getClientName(context: SdkContext, type: Type & { name: string }) {
const clientName = getClientNameOverride(context, type);
const clientName = getClientNameOverride(context, type, "powershell");
return clientName ?? type.name;
}

Expand Down
2 changes: 1 addition & 1 deletion packages/typespec-powershell/src/utils/modelUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -743,7 +743,7 @@ function getSchemaForModel(
}

const program = dpgContext.program;
const overridedModelName = getClientNameOverride(dpgContext, model) ??
const overridedModelName = getClientNameOverride(dpgContext, model, "powershell") ??
getFriendlyName(program, model) ?? getWireName(dpgContext, model);

const fullNamespaceName =
Expand Down
3 changes: 2 additions & 1 deletion tests-upgrade/tests-emitter/EmitterTest.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ function GenerateModuleWithEmitter {
[TestEmitterModel]
$TestEmitter
)
$result = (tsp compile ./ --emit $script:PowerShellEmitter) | Out-String
$tspFile = if (Test-Path "./client.tsp") { "./client.tsp" } else { "./" }
$result = (tsp compile $tspFile --emit $script:PowerShellEmitter) | Out-String
Write-Debug "$($TestEmitter.TestName) generated powershell debug information"
Write-Debug $result

Expand Down
Loading