File tree Expand file tree Collapse file tree 5 files changed +13
-6
lines changed
codegen/smithy-aws-kotlin-codegen/src/main/kotlin/aws/sdk/kotlin/codegen Expand file tree Collapse file tree 5 files changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -237,7 +237,7 @@ class PresignerGenerator : KotlinIntegration {
237237 writer.addImport(RuntimeTypes .Http .QueryParameters )
238238 writer.addImport(RuntimeTypes .Http .toByteStream)
239239 writer.addImport(RuntimeTypes .Core .Content .decodeToString)
240- writer.addImport(RuntimeTypes .Http .splitAsQueryParameters)
240+ writer.addImport(RuntimeTypes .Http .Util . splitAsQueryParameters)
241241 writer.write(""" httpRequestBuilder.body.toByteStream()?.decodeToString()?.splitAsQueryParameters() ?: QueryParameters.Empty,""" )
242242 }
243243 }
Original file line number Diff line number Diff line change @@ -22,8 +22,8 @@ import software.amazon.smithy.model.shapes.*
2222 * @see AwsHttpBindingProtocolGenerator
2323 */
2424class AwsJson1_0 : JsonHttpBindingProtocolGenerator () {
25-
2625 override val protocol: ShapeId = AwsJson1_0Trait .ID
26+ override val supportsJsonNameTrait: Boolean = false
2727
2828 override fun getDefaultHttpMiddleware (ctx : ProtocolGenerator .GenerationContext ): List <ProtocolMiddleware > {
2929 val httpMiddleware = super .getDefaultHttpMiddleware(ctx)
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ import software.amazon.smithy.model.shapes.ShapeId
2525 */
2626class AwsJson1_1 : JsonHttpBindingProtocolGenerator () {
2727 override val protocol: ShapeId = AwsJson1_1Trait .ID
28+ override val supportsJsonNameTrait: Boolean = false
2829
2930 override fun getDefaultHttpMiddleware (ctx : ProtocolGenerator .GenerationContext ): List <ProtocolMiddleware > {
3031 val httpMiddleware = super .getDefaultHttpMiddleware(ctx)
Original file line number Diff line number Diff line change @@ -20,11 +20,17 @@ abstract class JsonHttpBindingProtocolGenerator : AwsHttpBindingProtocolGenerato
2020
2121 override val defaultTimestampFormat: TimestampFormatTrait .Format = TimestampFormatTrait .Format .EPOCH_SECONDS
2222
23+ /* *
24+ * Flag indicating if the jsonName trait is supported or not. When true the trait is processed when generating
25+ * serializers and deserializers. When false the member name is used.
26+ */
27+ open val supportsJsonNameTrait: Boolean = true
28+
2329 override fun structuredDataParser (ctx : ProtocolGenerator .GenerationContext ): StructuredDataParserGenerator =
24- JsonParserGenerator (this )
30+ JsonParserGenerator (this , supportsJsonNameTrait = supportsJsonNameTrait )
2531
2632 override fun structuredDataSerializer (ctx : ProtocolGenerator .GenerationContext ): StructuredDataSerializerGenerator =
27- JsonSerializerGenerator (this )
33+ JsonSerializerGenerator (this , supportsJsonNameTrait = supportsJsonNameTrait )
2834
2935 override fun renderDeserializeErrorDetails (
3036 ctx : ProtocolGenerator .GenerationContext ,
Original file line number Diff line number Diff line change @@ -9,10 +9,10 @@ org.gradle.jvmargs=-Xmx6g -XX:MaxPermSize=6g -XX:MaxMetaspaceSize=1G
99sdkVersion =0.12.1-SNAPSHOT
1010
1111# codegen
12- smithyVersion =1.13.1
12+ smithyVersion =1.17.0
1313smithyGradleVersion =0.5.3
1414# smithy-kotlin codegen and runtime are versioned together
15- smithyKotlinVersion =0.7.7
15+ smithyKotlinVersion =0.7.8-SNAPSHOT
1616
1717# kotlin
1818kotlinVersion =1.6.10
You can’t perform that action at this time.
0 commit comments