Skip to content
This repository was archived by the owner on Sep 27, 2019. It is now read-only.
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
20 changes: 0 additions & 20 deletions PSSwagger/GeneratedHelpers.ps1

This file was deleted.

7 changes: 6 additions & 1 deletion PSSwagger/New-ServiceClient.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,12 @@ function New-ServiceClient {
$ClientArgumentList += Invoke-Command @InvokeCommand_parameters

if ($AddHttpClientHandler) {
$httpClientHandler = New-HttpClientHandler -Credential $Credential
if(-not ('System.Net.Http.HttpClientHandler' -as [Type])) {
Add-Type -AssemblyName System.Net.Http
}
$httpClientHandler = New-Object -TypeName System.Net.Http.HttpClientHandler
$httpClientHandler.PreAuthenticate = $true
$httpClientHandler.Credentials = $Credential
$ClientArgumentList += $httpClientHandler
}

Expand Down
1 change: 0 additions & 1 deletion PSSwagger/PSSwagger.Constants.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ if (Test-Path -Path `$ClrPath -PathType Container) {
}

. (Join-Path -Path `$PSScriptRoot -ChildPath 'New-ServiceClient.ps1')
. (Join-Path -Path `$PSScriptRoot -ChildPath 'GeneratedHelpers.ps1')

`$allPs1FilesPath = Join-Path -Path `$PSScriptRoot -ChildPath '$GeneratedCommandsName' | Join-Path -ChildPath '*.ps1'
Get-ChildItem -Path `$allPs1FilesPath -Recurse -File | ForEach-Object { . `$_.FullName}
Expand Down
5 changes: 1 addition & 4 deletions PSSwagger/PSSwagger.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -618,10 +618,7 @@ function New-PSSwaggerModule
-Info $swaggerDict['info'] `
-PSHeaderComment $PSHeaderComment

$CopyFilesMap = [ordered]@{
'GeneratedHelpers.ps1' = 'GeneratedHelpers.ps1'
}

$CopyFilesMap = [ordered]@{}
if($UseAzureCsharpGenerator) {
$CopyFilesMap['New-ArmServiceClient.ps1'] = 'New-ServiceClient.ps1'
$CopyFilesMap['Test-FullRequirements.ps1'] = 'Test-FullRequirements.ps1'
Expand Down