diff --git a/.changes/next-release/feature-879243c73ed26a3a329d679f9e1554798714c5f1.json b/.changes/next-release/feature-879243c73ed26a3a329d679f9e1554798714c5f1.json new file mode 100644 index 00000000000..213e9e6afb9 --- /dev/null +++ b/.changes/next-release/feature-879243c73ed26a3a329d679f9e1554798714c5f1.json @@ -0,0 +1,7 @@ +{ + "type": "other", + "description": "Removed protocol tests for skipping null values in dense collections. This behavior can silently drop data. SDKs that cannot preserve null values should raise an exception instead", + "pull_requests": [ + "[#2972](https://github.com/smithy-lang/smithy/pull/2972)" + ] +} diff --git a/smithy-aws-protocol-tests/model/restJson1/json-maps.smithy b/smithy-aws-protocol-tests/model/restJson1/json-maps.smithy index 814c38a8f00..b715865e52c 100644 --- a/smithy-aws-protocol-tests/model/restJson1/json-maps.smithy +++ b/smithy-aws-protocol-tests/model/restJson1/json-maps.smithy @@ -187,33 +187,6 @@ apply JsonMaps @httpResponseTests([ "y": ["a", "b"] } } - }, - { - id: "RestJsonDeserializesDenseSetMapAndSkipsNull", - documentation: """ - Clients SHOULD tolerate seeing a null value in a dense map, and they SHOULD - drop the null key-value pair.""", - protocol: restJson1, - appliesTo: "client", - code: 200, - body: """ - { - "denseSetMap": { - "x": [], - "y": ["a", "b"], - "z": null - } - }""", - bodyMediaType: "application/json", - headers: { - "Content-Type": "application/json" - }, - params: { - "denseSetMap": { - "x": [], - "y": ["a", "b"] - } - } } ]) diff --git a/smithy-protocol-tests/model/rpcv2Cbor/cbor-maps.smithy b/smithy-protocol-tests/model/rpcv2Cbor/cbor-maps.smithy index 6013433f089..ea1c57ab297 100644 --- a/smithy-protocol-tests/model/rpcv2Cbor/cbor-maps.smithy +++ b/smithy-protocol-tests/model/rpcv2Cbor/cbor-maps.smithy @@ -156,27 +156,6 @@ apply RpcV2CborDenseMaps @httpResponseTests([ "y": ["a", "b"] } } - }, - { - id: "RpcV2CborDeserializesDenseSetMapAndSkipsNull", - documentation: """ - Clients SHOULD tolerate seeing a null value in a dense map, and they SHOULD - drop the null key-value pair.""", - protocol: rpcv2Cbor, - appliesTo: "client", - code: 200, - body: "oWtkZW5zZVNldE1hcKNheIBheYJhYWFiYXr2", - bodyMediaType: "application/cbor", - headers: { - "smithy-protocol": "rpc-v2-cbor", - "Content-Type": "application/cbor" - }, - params: { - "denseSetMap": { - "x": [], - "y": ["a", "b"] - } - } } ])