Skip to content

Commit 49426a6

Browse files
authored
fix: when passing in arguments, compare by lowercase (#308)
1 parent 2ce7159 commit 49426a6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

smithy-swift-codegen/src/main/kotlin/software/amazon/smithy/swift/codegen/ShapeValueGenerator.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ class ShapeValueGenerator(
221221
// this is important because when a struct is generated in swift it is generated with its members sorted by name.
222222
// when you instantiate that struct you have to call params in order with their param names. if you don't it won't compile
223223
// so we sort here before we write any of the members with their values
224-
val sortedMembers = node.members.toSortedMap(compareBy<StringNode> { it.value })
224+
val sortedMembers = node.members.toSortedMap(compareBy<StringNode> { it.value.lowercase() })
225225
sortedMembers.forEach { (keyNode, valueNode) ->
226226
val memberShape: Shape
227227
when (currShape) {

0 commit comments

Comments
 (0)