Skip to content

Commit 4f95ff8

Browse files
authored
chore: Update to Smithy 1.49.0 (#733)
1 parent f29e57c commit 4f95ff8

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ kotlin.code.style=official
33
# config
44

55
# codegen
6-
smithyVersion=1.47.0
6+
smithyVersion=1.49.0
77
smithyGradleVersion=0.6.0
88

99
# kotlin

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package software.amazon.smithy.swift.codegen
33
import software.amazon.smithy.aws.traits.ServiceTrait
44
import software.amazon.smithy.aws.traits.auth.SigV4Trait
55
import software.amazon.smithy.aws.traits.auth.UnsignedPayloadTrait
6-
import software.amazon.smithy.codegen.core.CodegenException
76
import software.amazon.smithy.codegen.core.Symbol
87
import software.amazon.smithy.model.knowledge.ServiceIndex
98
import software.amazon.smithy.model.shapes.OperationShape
@@ -285,7 +284,7 @@ fun Parameter.toSymbol(): Symbol {
285284
val swiftType = when (type) {
286285
ParameterType.STRING -> SwiftTypes.String
287286
ParameterType.BOOLEAN -> SwiftTypes.Bool
288-
else -> throw CodegenException("Unsupported parameter type: $type")
287+
ParameterType.STRING_ARRAY -> SwiftTypes.StringArray
289288
}
290289
var builder = Symbol.builder().name(swiftType.fullName)
291290
if (!isRequired) {

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ object SwiftTypes {
1616
val Double = builtInSymbol("Double")
1717
val Bool = builtInSymbol("Bool")
1818

19+
val StringArray = builtInSymbol("Array<Swift.String>")
20+
1921
val List = builtInSymbol("List")
2022
val Set = builtInSymbol("Set")
2123
val Map = builtInSymbol("Map")

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
package software.amazon.smithy.swift.codegen.endpoints
77

8-
import software.amazon.smithy.codegen.core.CodegenException
98
import software.amazon.smithy.codegen.core.Symbol
109
import software.amazon.smithy.rulesengine.language.EndpointRuleSet
1110
import software.amazon.smithy.rulesengine.language.syntax.parameters.Parameter
@@ -86,7 +85,7 @@ fun Parameter.toSymbol(): Symbol {
8685
val swiftType = when (type) {
8786
ParameterType.STRING -> SwiftTypes.String
8887
ParameterType.BOOLEAN -> SwiftTypes.Bool
89-
else -> throw CodegenException("Unsupported parameter type: $type")
88+
ParameterType.STRING_ARRAY -> SwiftTypes.StringArray
9089
}
9190
var builder = Symbol.builder().name(swiftType.fullName)
9291
if (!isRequired) {

0 commit comments

Comments
 (0)