diff --git a/gradle.properties b/gradle.properties index 5dfb35bec..615f487a3 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,7 +3,7 @@ kotlin.code.style=official # config # codegen -smithyVersion=1.47.0 +smithyVersion=1.49.0 smithyGradleVersion=0.6.0 # kotlin diff --git a/smithy-swift-codegen/src/main/kotlin/software/amazon/smithy/swift/codegen/AuthSchemeResolverGenerator.kt b/smithy-swift-codegen/src/main/kotlin/software/amazon/smithy/swift/codegen/AuthSchemeResolverGenerator.kt index 1ee2a1cb5..3b7f803ef 100644 --- a/smithy-swift-codegen/src/main/kotlin/software/amazon/smithy/swift/codegen/AuthSchemeResolverGenerator.kt +++ b/smithy-swift-codegen/src/main/kotlin/software/amazon/smithy/swift/codegen/AuthSchemeResolverGenerator.kt @@ -3,7 +3,6 @@ package software.amazon.smithy.swift.codegen import software.amazon.smithy.aws.traits.ServiceTrait import software.amazon.smithy.aws.traits.auth.SigV4Trait import software.amazon.smithy.aws.traits.auth.UnsignedPayloadTrait -import software.amazon.smithy.codegen.core.CodegenException import software.amazon.smithy.codegen.core.Symbol import software.amazon.smithy.model.knowledge.ServiceIndex import software.amazon.smithy.model.shapes.OperationShape @@ -285,7 +284,7 @@ fun Parameter.toSymbol(): Symbol { val swiftType = when (type) { ParameterType.STRING -> SwiftTypes.String ParameterType.BOOLEAN -> SwiftTypes.Bool - else -> throw CodegenException("Unsupported parameter type: $type") + ParameterType.STRING_ARRAY -> SwiftTypes.StringArray } var builder = Symbol.builder().name(swiftType.fullName) if (!isRequired) { diff --git a/smithy-swift-codegen/src/main/kotlin/software/amazon/smithy/swift/codegen/SwiftTypes.kt b/smithy-swift-codegen/src/main/kotlin/software/amazon/smithy/swift/codegen/SwiftTypes.kt index b4996f1d2..8b693882b 100644 --- a/smithy-swift-codegen/src/main/kotlin/software/amazon/smithy/swift/codegen/SwiftTypes.kt +++ b/smithy-swift-codegen/src/main/kotlin/software/amazon/smithy/swift/codegen/SwiftTypes.kt @@ -16,6 +16,8 @@ object SwiftTypes { val Double = builtInSymbol("Double") val Bool = builtInSymbol("Bool") + val StringArray = builtInSymbol("Array") + val List = builtInSymbol("List") val Set = builtInSymbol("Set") val Map = builtInSymbol("Map") diff --git a/smithy-swift-codegen/src/main/kotlin/software/amazon/smithy/swift/codegen/endpoints/EndpointParamsGenerator.kt b/smithy-swift-codegen/src/main/kotlin/software/amazon/smithy/swift/codegen/endpoints/EndpointParamsGenerator.kt index e22cef456..644188ca1 100644 --- a/smithy-swift-codegen/src/main/kotlin/software/amazon/smithy/swift/codegen/endpoints/EndpointParamsGenerator.kt +++ b/smithy-swift-codegen/src/main/kotlin/software/amazon/smithy/swift/codegen/endpoints/EndpointParamsGenerator.kt @@ -5,7 +5,6 @@ package software.amazon.smithy.swift.codegen.endpoints -import software.amazon.smithy.codegen.core.CodegenException import software.amazon.smithy.codegen.core.Symbol import software.amazon.smithy.rulesengine.language.EndpointRuleSet import software.amazon.smithy.rulesengine.language.syntax.parameters.Parameter @@ -86,7 +85,7 @@ fun Parameter.toSymbol(): Symbol { val swiftType = when (type) { ParameterType.STRING -> SwiftTypes.String ParameterType.BOOLEAN -> SwiftTypes.Bool - else -> throw CodegenException("Unsupported parameter type: $type") + ParameterType.STRING_ARRAY -> SwiftTypes.StringArray } var builder = Symbol.builder().name(swiftType.fullName) if (!isRequired) {