From 903e169a40eb7f7f3edb76ad59567ba53d8b131a Mon Sep 17 00:00:00 2001 From: sbiscigl Date: Mon, 8 May 2023 10:36:30 -0400 Subject: [PATCH] Fix codegen for flat members --- .../velocity/cpp/xml/ModelClassMembersXmlizeSource.vm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/xml/ModelClassMembersXmlizeSource.vm b/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/xml/ModelClassMembersXmlizeSource.vm index 70af955259e..43d554112b0 100644 --- a/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/xml/ModelClassMembersXmlizeSource.vm +++ b/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/xml/ModelClassMembersXmlizeSource.vm @@ -104,15 +104,15 @@ ${spaces}XmlNode ${lowerCaseVarName}Node = parentNode.CreateChildElement("${serializationName}"); ${spaces}${memberVarName}.AddToNode(${lowerCaseVarName}Node); #elseif($member.shape.list) -#if($member.flattened) - ${spaces}XmlNode ${lowerCaseVarName}ParentNode = parentNode.CreateChildElement("${memberName}"); -#elseif(!($member.locationName && $member.shape.flattened)) +#if(!($member.locationName && $member.shape.flattened) && !(${member.shape.listMember.locationName} && ${member.isFlattened()})) ${spaces}XmlNode ${lowerCaseVarName}ParentNode = parentNode.CreateChildElement("${serializationName}"); #end ${spaces}for(const auto& item : $memberVarName) ${spaces}{ #if($member.locationName && $member.shape.flattened) ${spaces}XmlNode ${lowerCaseVarName}Node = parentNode.CreateChildElement("${member.locationName}"); +#elseif(${member.shape.listMember.locationName} && ${member.isFlattened()}) + ${spaces}XmlNode ${lowerCaseVarName}Node = parentNode.CreateChildElement("${member.shape.listMember.locationName}"); #elseif(${member.shape.listMember.locationName}) ${spaces}XmlNode ${lowerCaseVarName}Node = ${lowerCaseVarName}ParentNode.CreateChildElement("${member.shape.listMember.locationName}"); #else