File tree Expand file tree Collapse file tree 4 files changed +5
-5
lines changed
smithy-swift-codegen/src/main/kotlin/software/amazon/smithy/swift/codegen Expand file tree Collapse file tree 4 files changed +5
-5
lines changed Original file line number Diff line number Diff 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
77smithyGradleVersion =0.6.0
88
99# kotlin
Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ package software.amazon.smithy.swift.codegen
33import software.amazon.smithy.aws.traits.ServiceTrait
44import software.amazon.smithy.aws.traits.auth.SigV4Trait
55import software.amazon.smithy.aws.traits.auth.UnsignedPayloadTrait
6- import software.amazon.smithy.codegen.core.CodegenException
76import software.amazon.smithy.codegen.core.Symbol
87import software.amazon.smithy.model.knowledge.ServiceIndex
98import 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) {
Original file line number Diff line number Diff 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" )
Original file line number Diff line number Diff line change 55
66package software.amazon.smithy.swift.codegen.endpoints
77
8- import software.amazon.smithy.codegen.core.CodegenException
98import software.amazon.smithy.codegen.core.Symbol
109import software.amazon.smithy.rulesengine.language.EndpointRuleSet
1110import 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) {
You can’t perform that action at this time.
0 commit comments