Loading codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/smithy/protocols/parse/JsonParserGenerator.kt +16 −2 Original line number Diff line number Diff line Loading @@ -389,8 +389,22 @@ class JsonParserGenerator( withBlock("let value =", ";") { deserializeMember(shape.member) } rustBlock("if let Some(value) = value") { rust("items.push(value);") rust( """ if let Some(value) = value { items.push(value); } """, ) codegenTarget.ifServer { rustTemplate( """ else { return Err(#{Error}::custom("dense list cannot contain null values")); } """, *codegenScope, ) } } } Loading codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/protocol/ServerProtocolTestGenerator.kt +0 −1 Original line number Diff line number Diff line Loading @@ -773,7 +773,6 @@ class ServerProtocolTestGenerator( FailingTest(RestJson, "RestJsonEndpointTraitWithHostLabel", TestType.Request), FailingTest(RestJson, "RestJsonWithBodyExpectsApplicationJsonContentType", TestType.MalformedRequest), FailingTest(RestJson, "RestJsonBodyMalformedListNullItem", TestType.MalformedRequest), // Deprioritized, sets don't exist in Smithy 2.0. // They have the exact same semantics as list shapes with `@uniqueItems`, Loading Loading
codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/smithy/protocols/parse/JsonParserGenerator.kt +16 −2 Original line number Diff line number Diff line Loading @@ -389,8 +389,22 @@ class JsonParserGenerator( withBlock("let value =", ";") { deserializeMember(shape.member) } rustBlock("if let Some(value) = value") { rust("items.push(value);") rust( """ if let Some(value) = value { items.push(value); } """, ) codegenTarget.ifServer { rustTemplate( """ else { return Err(#{Error}::custom("dense list cannot contain null values")); } """, *codegenScope, ) } } } Loading
codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/protocol/ServerProtocolTestGenerator.kt +0 −1 Original line number Diff line number Diff line Loading @@ -773,7 +773,6 @@ class ServerProtocolTestGenerator( FailingTest(RestJson, "RestJsonEndpointTraitWithHostLabel", TestType.Request), FailingTest(RestJson, "RestJsonWithBodyExpectsApplicationJsonContentType", TestType.MalformedRequest), FailingTest(RestJson, "RestJsonBodyMalformedListNullItem", TestType.MalformedRequest), // Deprioritized, sets don't exist in Smithy 2.0. // They have the exact same semantics as list shapes with `@uniqueItems`, Loading