Loading codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/protocols/ServerHttpProtocolGenerator.kt +2 −2 Original line number Diff line number Diff line Loading @@ -451,12 +451,12 @@ private class ServerHttpProtocolImplGenerator( bindings: List<HttpBindingDescriptor>, ) { val structuredDataSerializer = protocol.structuredDataSerializer(operationShape) structuredDataSerializer.serverOutputSerializer(operationShape).also { serializer -> structuredDataSerializer.serverOutputSerializer(operationShape)?.let { serializer -> rust( "let payload = #T(output)?;", serializer ) } } ?: rust("""let payload = "";""") // avoid non-usage warnings for response Attribute.AllowUnusedMut.render(this) rustTemplate("let mut response = #{http}::Response::builder();", *codegenScope) Loading codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/XmlNameIndex.kt +2 −1 Original line number Diff line number Diff line Loading @@ -63,5 +63,6 @@ data class XmlMemberIndex(val dataMembers: List<MemberShape>, val attributeMembe } } fun isNotEmpty() = dataMembers.isNotEmpty() || attributeMembers.isNotEmpty() fun isEmpty() = dataMembers.isEmpty() && attributeMembers.isEmpty() fun isNotEmpty() = !isEmpty() } codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/serialize/AwsQuerySerializerGenerator.kt +1 −1 Original line number Diff line number Diff line Loading @@ -22,7 +22,7 @@ class AwsQuerySerializerGenerator(codegenContext: CodegenContext) : QuerySeriali override fun MemberShape.isFlattened(): Boolean = getTrait<XmlFlattenedTrait>() != null override fun serverOutputSerializer(operationShape: OperationShape): RuntimeType { override fun serverOutputSerializer(operationShape: OperationShape): RuntimeType? { TODO("Not yet implemented") } Loading codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/serialize/Ec2QuerySerializerGenerator.kt +1 −1 Original line number Diff line number Diff line Loading @@ -25,7 +25,7 @@ class Ec2QuerySerializerGenerator(codegenContext: CodegenContext) : QuerySeriali override fun MemberShape.isFlattened(): Boolean = true override fun serverOutputSerializer(operationShape: OperationShape): RuntimeType { override fun serverOutputSerializer(operationShape: OperationShape): RuntimeType? { TODO("Not yet implemented") } Loading codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/serialize/JsonSerializerGenerator.kt +1 −1 Original line number Diff line number Diff line Loading @@ -242,7 +242,7 @@ class JsonSerializerGenerator( } } override fun serverOutputSerializer(operationShape: OperationShape): RuntimeType { override fun serverOutputSerializer(operationShape: OperationShape): RuntimeType? { val outputShape = operationShape.outputShape(model) val includedMembers = httpBindingResolver.responseMembers(operationShape, HttpLocation.DOCUMENT) val fnName = symbolProvider.serializeFunctionName(outputShape) Loading Loading
codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/protocols/ServerHttpProtocolGenerator.kt +2 −2 Original line number Diff line number Diff line Loading @@ -451,12 +451,12 @@ private class ServerHttpProtocolImplGenerator( bindings: List<HttpBindingDescriptor>, ) { val structuredDataSerializer = protocol.structuredDataSerializer(operationShape) structuredDataSerializer.serverOutputSerializer(operationShape).also { serializer -> structuredDataSerializer.serverOutputSerializer(operationShape)?.let { serializer -> rust( "let payload = #T(output)?;", serializer ) } } ?: rust("""let payload = "";""") // avoid non-usage warnings for response Attribute.AllowUnusedMut.render(this) rustTemplate("let mut response = #{http}::Response::builder();", *codegenScope) Loading
codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/XmlNameIndex.kt +2 −1 Original line number Diff line number Diff line Loading @@ -63,5 +63,6 @@ data class XmlMemberIndex(val dataMembers: List<MemberShape>, val attributeMembe } } fun isNotEmpty() = dataMembers.isNotEmpty() || attributeMembers.isNotEmpty() fun isEmpty() = dataMembers.isEmpty() && attributeMembers.isEmpty() fun isNotEmpty() = !isEmpty() }
codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/serialize/AwsQuerySerializerGenerator.kt +1 −1 Original line number Diff line number Diff line Loading @@ -22,7 +22,7 @@ class AwsQuerySerializerGenerator(codegenContext: CodegenContext) : QuerySeriali override fun MemberShape.isFlattened(): Boolean = getTrait<XmlFlattenedTrait>() != null override fun serverOutputSerializer(operationShape: OperationShape): RuntimeType { override fun serverOutputSerializer(operationShape: OperationShape): RuntimeType? { TODO("Not yet implemented") } Loading
codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/serialize/Ec2QuerySerializerGenerator.kt +1 −1 Original line number Diff line number Diff line Loading @@ -25,7 +25,7 @@ class Ec2QuerySerializerGenerator(codegenContext: CodegenContext) : QuerySeriali override fun MemberShape.isFlattened(): Boolean = true override fun serverOutputSerializer(operationShape: OperationShape): RuntimeType { override fun serverOutputSerializer(operationShape: OperationShape): RuntimeType? { TODO("Not yet implemented") } Loading
codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/serialize/JsonSerializerGenerator.kt +1 −1 Original line number Diff line number Diff line Loading @@ -242,7 +242,7 @@ class JsonSerializerGenerator( } } override fun serverOutputSerializer(operationShape: OperationShape): RuntimeType { override fun serverOutputSerializer(operationShape: OperationShape): RuntimeType? { val outputShape = operationShape.outputShape(model) val includedMembers = httpBindingResolver.responseMembers(operationShape, HttpLocation.DOCUMENT) val fnName = symbolProvider.serializeFunctionName(outputShape) Loading