ps minor style change (#6424)

This commit is contained in:
William Cheng 2020-05-26 10:17:02 +08:00 committed by GitHub
parent d49de5b577
commit c73cafec6b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 10 deletions

View File

@ -86,7 +86,7 @@ Access token for authentication/authorization
.PARAMETER SkipCertificateCheck .PARAMETER SkipCertificateCheck
Skip certificate verification Skip certificate verification
.PARAMETER DefaultHeaders .PARAMETER DefaultHeaders
Default HTTP headers to be included in the HTTP request Default HTTP headers to be included in the HTTP request
.PARAMETER PassThru .PARAMETER PassThru
@ -124,7 +124,6 @@ function Set-{{{apiNamePrefix}}}Configuration {
if (!($null -ne $URL.AbsoluteURI -and $URL.Scheme -match '[http|https]')) { if (!($null -ne $URL.AbsoluteURI -and $URL.Scheme -match '[http|https]')) {
throw "Invalid URL '$($BaseUrl)' cannot be used in the base URL." throw "Invalid URL '$($BaseUrl)' cannot be used in the base URL."
} }
$Script:Configuration["BaseUrl"] = $BaseUrl $Script:Configuration["BaseUrl"] = $BaseUrl
} }
@ -156,7 +155,7 @@ function Set-{{{apiNamePrefix}}}Configuration {
$Script:Configuration['SkipCertificateCheck'] = $true $Script:Configuration['SkipCertificateCheck'] = $true
} else { } else {
$Script:Configuration['SkipCertificateCheck'] = $false $Script:Configuration['SkipCertificateCheck'] = $false
} }
If ($DefaultHeaders) { If ($DefaultHeaders) {
$Script:Configuration['DefaultHeaders'] = $DefaultHeaders $Script:Configuration['DefaultHeaders'] = $DefaultHeaders
@ -325,7 +324,7 @@ Get the URL from the host settings.
.PARAMETER Index .PARAMETER Index
Index of the host settings (array) Index of the host settings (array)
.PARAMETER Variables .PARAMETER Variables
Names and values of the variables (hashtable) Names and values of the variables (hashtable)
.DESCRIPTION .DESCRIPTION

View File

@ -20,7 +20,7 @@ function ConvertFrom-{{{apiNamePrefix}}}JsonTo{{{classname}}} {
Param ( Param (
[AllowEmptyString()] [AllowEmptyString()]
[string]$Json [string]$Json
) )
Process { Process {
$match = 0 $match = 0
@ -53,6 +53,7 @@ function ConvertFrom-{{{apiNamePrefix}}}JsonTo{{{classname}}} {
} }
} catch { } catch {
# fail to match the schema defined in anyOf, proceed to the next one # fail to match the schema defined in anyOf, proceed to the next one
Write-Debug "Failed to match '{{{.}}}' defined in anyOf ({{{apiNamePrefix}}}{{{classname}}}). Proceeding to the next one if any."
} }
} }

View File

@ -20,7 +20,7 @@ function ConvertFrom-{{{apiNamePrefix}}}JsonTo{{{classname}}} {
Param ( Param (
[AllowEmptyString()] [AllowEmptyString()]
[string]$Json [string]$Json
) )
Process { Process {
$match = 0 $match = 0
@ -52,6 +52,7 @@ function ConvertFrom-{{{apiNamePrefix}}}JsonTo{{{classname}}} {
} }
} catch { } catch {
# fail to match the schema defined in oneOf, proceed to the next one # fail to match the schema defined in oneOf, proceed to the next one
Write-Debug "Failed to match '{{{.}}}' defined in oneOf ({{{apiNamePrefix}}}{{{classname}}}). Proceeding to the next one if any."
} }
{{/oneOf}} {{/oneOf}}

View File

@ -92,7 +92,7 @@ Access token for authentication/authorization
.PARAMETER SkipCertificateCheck .PARAMETER SkipCertificateCheck
Skip certificate verification Skip certificate verification
.PARAMETER DefaultHeaders .PARAMETER DefaultHeaders
Default HTTP headers to be included in the HTTP request Default HTTP headers to be included in the HTTP request
.PARAMETER PassThru .PARAMETER PassThru
@ -130,7 +130,6 @@ function Set-PSConfiguration {
if (!($null -ne $URL.AbsoluteURI -and $URL.Scheme -match '[http|https]')) { if (!($null -ne $URL.AbsoluteURI -and $URL.Scheme -match '[http|https]')) {
throw "Invalid URL '$($BaseUrl)' cannot be used in the base URL." throw "Invalid URL '$($BaseUrl)' cannot be used in the base URL."
} }
$Script:Configuration["BaseUrl"] = $BaseUrl $Script:Configuration["BaseUrl"] = $BaseUrl
} }
@ -162,7 +161,7 @@ function Set-PSConfiguration {
$Script:Configuration['SkipCertificateCheck'] = $true $Script:Configuration['SkipCertificateCheck'] = $true
} else { } else {
$Script:Configuration['SkipCertificateCheck'] = $false $Script:Configuration['SkipCertificateCheck'] = $false
} }
If ($DefaultHeaders) { If ($DefaultHeaders) {
$Script:Configuration['DefaultHeaders'] = $DefaultHeaders $Script:Configuration['DefaultHeaders'] = $DefaultHeaders
@ -341,7 +340,7 @@ Get the URL from the host settings.
.PARAMETER Index .PARAMETER Index
Index of the host settings (array) Index of the host settings (array)
.PARAMETER Variables .PARAMETER Variables
Names and values of the variables (hashtable) Names and values of the variables (hashtable)
.DESCRIPTION .DESCRIPTION