Skip to content

Commit

Permalink
Use xmlNameTrait when outputting xmlRootNodeName
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-fowler committed Oct 16, 2024
1 parent 2a7dc09 commit 066e10e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Sources/SotoCodeGeneratorLib/AwsService+shapes.swift
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,12 @@ extension AwsService {
} else if isInput {
// set XML root node name.
if serviceProtocolTrait is AwsProtocolsRestXmlTrait {
xmlRootNodeName = payloadMember.key
// use XML name if trait exists
if let xmlNameTrait = payloadMember.value.trait(type: XmlNameTrait.self) {
xmlRootNodeName = xmlNameTrait.value
} else {
xmlRootNodeName = payloadMember.key
}
}
// currently only support request streaming of blobs
if payload is BlobShape,
Expand Down

0 comments on commit 066e10e

Please sign in to comment.