forked from loafle/openapi-generator-original
Fix proxy type (#18166)
* Update configuration.mustache Fix check of proxy type * Changing sample source files
This commit is contained in:
@@ -180,8 +180,8 @@ function Set-Configuration {
|
||||
}
|
||||
|
||||
If ($null -ne $Proxy) {
|
||||
If ($Proxy.GetType().FullName -ne "System.Net.SystemWebProxy" -and $Proxy.GetType().FullName -ne "System.Net.WebRequest+WebProxyWrapperOpaque") {
|
||||
throw "Incorrect Proxy type '$($Proxy.GetType().FullName)'. Must be System.Net.SystemWebProxy or System.Net.WebRequest+WebProxyWrapperOpaque."
|
||||
If ('System.Net.IWebProxy' -notin $Proxy.GetType().ImplementedInterfaces.FullName) {
|
||||
throw "Incorrect Proxy type '$($Proxy.GetType().FullName)'. Must implement System.Net.IWebProxy interface."
|
||||
}
|
||||
$Script:Configuration['Proxy'] = $Proxy
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user