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
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ Access token for authentication/authorization
.PARAMETER SkipCertificateCheck
Skip certificate verification

.PARAMETER DefaultHeaders
.PARAMETER DefaultHeaders
Default HTTP headers to be included in the HTTP request

.PARAMETER PassThru
Expand Down Expand Up @@ -124,7 +124,6 @@ function Set-{{{apiNamePrefix}}}Configuration {
if (!($null -ne $URL.AbsoluteURI -and $URL.Scheme -match '[http|https]')) {
throw "Invalid URL '$($BaseUrl)' cannot be used in the base URL."
}

$Script:Configuration["BaseUrl"] = $BaseUrl
}

Expand Down Expand Up @@ -156,7 +155,7 @@ function Set-{{{apiNamePrefix}}}Configuration {
$Script:Configuration['SkipCertificateCheck'] = $true
} else {
$Script:Configuration['SkipCertificateCheck'] = $false
}
}

If ($DefaultHeaders) {
$Script:Configuration['DefaultHeaders'] = $DefaultHeaders
Expand Down Expand Up @@ -325,7 +324,7 @@ Get the URL from the host settings.
.PARAMETER Index
Index of the host settings (array)

.PARAMETER Variables
.PARAMETER Variables
Names and values of the variables (hashtable)

.DESCRIPTION
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function ConvertFrom-{{{apiNamePrefix}}}JsonTo{{{classname}}} {
Param (
[AllowEmptyString()]
[string]$Json
)
)

Process {
$match = 0
Expand Down Expand Up @@ -53,6 +53,7 @@ function ConvertFrom-{{{apiNamePrefix}}}JsonTo{{{classname}}} {
}
} catch {
# 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."
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function ConvertFrom-{{{apiNamePrefix}}}JsonTo{{{classname}}} {
Param (
[AllowEmptyString()]
[string]$Json
)
)

Process {
$match = 0
Expand Down Expand Up @@ -52,6 +52,7 @@ function ConvertFrom-{{{apiNamePrefix}}}JsonTo{{{classname}}} {
}
} catch {
# 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}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ Access token for authentication/authorization
.PARAMETER SkipCertificateCheck
Skip certificate verification

.PARAMETER DefaultHeaders
.PARAMETER DefaultHeaders
Default HTTP headers to be included in the HTTP request

.PARAMETER PassThru
Expand Down Expand Up @@ -130,7 +130,6 @@ function Set-PSConfiguration {
if (!($null -ne $URL.AbsoluteURI -and $URL.Scheme -match '[http|https]')) {
throw "Invalid URL '$($BaseUrl)' cannot be used in the base URL."
}

$Script:Configuration["BaseUrl"] = $BaseUrl
}

Expand Down Expand Up @@ -162,7 +161,7 @@ function Set-PSConfiguration {
$Script:Configuration['SkipCertificateCheck'] = $true
} else {
$Script:Configuration['SkipCertificateCheck'] = $false
}
}

If ($DefaultHeaders) {
$Script:Configuration['DefaultHeaders'] = $DefaultHeaders
Expand Down Expand Up @@ -341,7 +340,7 @@ Get the URL from the host settings.
.PARAMETER Index
Index of the host settings (array)

.PARAMETER Variables
.PARAMETER Variables
Names and values of the variables (hashtable)

.DESCRIPTION
Expand Down