diff --git a/modules/openapi-generator/src/main/resources/powershell/model_anyof.mustache b/modules/openapi-generator/src/main/resources/powershell/model_anyof.mustache index e30dc91a3462..f58773df0490 100644 --- a/modules/openapi-generator/src/main/resources/powershell/model_anyof.mustache +++ b/modules/openapi-generator/src/main/resources/powershell/model_anyof.mustache @@ -46,7 +46,7 @@ function ConvertFrom-{{{apiNamePrefix}}}JsonTo{{{classname}}} { foreach($property in $matchInstance.PsObject.Properties) { if ($null -ne $property.Value) { - $matchType = "Dog" + $matchType = "{{{.}}}" $match++ break } diff --git a/modules/openapi-generator/src/main/resources/powershell/model_oneof.mustache b/modules/openapi-generator/src/main/resources/powershell/model_oneof.mustache index 98f4ab565d8b..5ff351bc4a83 100644 --- a/modules/openapi-generator/src/main/resources/powershell/model_oneof.mustache +++ b/modules/openapi-generator/src/main/resources/powershell/model_oneof.mustache @@ -45,7 +45,7 @@ function ConvertFrom-{{{apiNamePrefix}}}JsonTo{{{classname}}} { foreach($property in $matchInstance.PsObject.Properties) { if ($null -ne $property.Value) { - $matchType = "Dog" + $matchType = "{{{.}}}" $match++ break }