Skip to content

Commit c73cafe

Browse files
authored
ps minor style change (#6424)
1 parent d49de5b commit c73cafe

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

modules/openapi-generator/src/main/resources/powershell/configuration.mustache

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ Access token for authentication/authorization
8686
.PARAMETER SkipCertificateCheck
8787
Skip certificate verification
8888

89-
.PARAMETER DefaultHeaders
89+
.PARAMETER DefaultHeaders
9090
Default HTTP headers to be included in the HTTP request
9191

9292
.PARAMETER PassThru
@@ -124,7 +124,6 @@ function Set-{{{apiNamePrefix}}}Configuration {
124124
if (!($null -ne $URL.AbsoluteURI -and $URL.Scheme -match '[http|https]')) {
125125
throw "Invalid URL '$($BaseUrl)' cannot be used in the base URL."
126126
}
127-
128127
$Script:Configuration["BaseUrl"] = $BaseUrl
129128
}
130129

@@ -156,7 +155,7 @@ function Set-{{{apiNamePrefix}}}Configuration {
156155
$Script:Configuration['SkipCertificateCheck'] = $true
157156
} else {
158157
$Script:Configuration['SkipCertificateCheck'] = $false
159-
}
158+
}
160159

161160
If ($DefaultHeaders) {
162161
$Script:Configuration['DefaultHeaders'] = $DefaultHeaders
@@ -325,7 +324,7 @@ Get the URL from the host settings.
325324
.PARAMETER Index
326325
Index of the host settings (array)
327326

328-
.PARAMETER Variables
327+
.PARAMETER Variables
329328
Names and values of the variables (hashtable)
330329

331330
.DESCRIPTION

modules/openapi-generator/src/main/resources/powershell/model_anyof.mustache

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ function ConvertFrom-{{{apiNamePrefix}}}JsonTo{{{classname}}} {
2020
Param (
2121
[AllowEmptyString()]
2222
[string]$Json
23-
)
23+
)
2424
2525
Process {
2626
$match = 0
@@ -53,6 +53,7 @@ function ConvertFrom-{{{apiNamePrefix}}}JsonTo{{{classname}}} {
5353
}
5454
} catch {
5555
# fail to match the schema defined in anyOf, proceed to the next one
56+
Write-Debug "Failed to match '{{{.}}}' defined in anyOf ({{{apiNamePrefix}}}{{{classname}}}). Proceeding to the next one if any."
5657
}
5758
}
5859

modules/openapi-generator/src/main/resources/powershell/model_oneof.mustache

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ function ConvertFrom-{{{apiNamePrefix}}}JsonTo{{{classname}}} {
2020
Param (
2121
[AllowEmptyString()]
2222
[string]$Json
23-
)
23+
)
2424
2525
Process {
2626
$match = 0
@@ -52,6 +52,7 @@ function ConvertFrom-{{{apiNamePrefix}}}JsonTo{{{classname}}} {
5252
}
5353
} catch {
5454
# fail to match the schema defined in oneOf, proceed to the next one
55+
Write-Debug "Failed to match '{{{.}}}' defined in oneOf ({{{apiNamePrefix}}}{{{classname}}}). Proceeding to the next one if any."
5556
}
5657

5758
{{/oneOf}}

samples/client/petstore/powershell/src/PSPetstore/Client/PSConfiguration.ps1

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ Access token for authentication/authorization
9292
.PARAMETER SkipCertificateCheck
9393
Skip certificate verification
9494
95-
.PARAMETER DefaultHeaders
95+
.PARAMETER DefaultHeaders
9696
Default HTTP headers to be included in the HTTP request
9797
9898
.PARAMETER PassThru
@@ -130,7 +130,6 @@ function Set-PSConfiguration {
130130
if (!($null -ne $URL.AbsoluteURI -and $URL.Scheme -match '[http|https]')) {
131131
throw "Invalid URL '$($BaseUrl)' cannot be used in the base URL."
132132
}
133-
134133
$Script:Configuration["BaseUrl"] = $BaseUrl
135134
}
136135

@@ -162,7 +161,7 @@ function Set-PSConfiguration {
162161
$Script:Configuration['SkipCertificateCheck'] = $true
163162
} else {
164163
$Script:Configuration['SkipCertificateCheck'] = $false
165-
}
164+
}
166165

167166
If ($DefaultHeaders) {
168167
$Script:Configuration['DefaultHeaders'] = $DefaultHeaders
@@ -341,7 +340,7 @@ Get the URL from the host settings.
341340
.PARAMETER Index
342341
Index of the host settings (array)
343342
344-
.PARAMETER Variables
343+
.PARAMETER Variables
345344
Names and values of the variables (hashtable)
346345
347346
.DESCRIPTION

0 commit comments

Comments
 (0)