Skip to content

Commit 029ce2c

Browse files
authored
fix hardcoded match type (#6431)
1 parent 707a88d commit 029ce2c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ function ConvertFrom-{{{apiNamePrefix}}}JsonTo{{{classname}}} {
4646

4747
foreach($property in $matchInstance.PsObject.Properties) {
4848
if ($null -ne $property.Value) {
49-
$matchType = "Dog"
49+
$matchType = "{{{.}}}"
5050
$match++
5151
break
5252
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ function ConvertFrom-{{{apiNamePrefix}}}JsonTo{{{classname}}} {
4545

4646
foreach($property in $matchInstance.PsObject.Properties) {
4747
if ($null -ne $property.Value) {
48-
$matchType = "Dog"
48+
$matchType = "{{{.}}}"
4949
$match++
5050
break
5151
}

0 commit comments

Comments
 (0)