Server Test

Server Test

rev. 000b37a512bd3be1a17b4f3d5bf60e5446dbc2dd

Files changed:

tmp-codegen-diff/codegen-server-test/constraints/rust-server-codegen/src/unconstrained.rs

@@ -113,113 +173,175 @@
  133    133   
                        }
  134    134   
                    }
  135    135   
    impl std::convert::TryFrom<ListOfLengthPatternStringUnconstrained> for crate::constrained::list_of_length_pattern_string_constrained::ListOfLengthPatternStringConstrained {
  136    136   
        type Error = crate::model::list_of_length_pattern_string::ConstraintViolation;
  137    137   
        fn try_from(value: ListOfLengthPatternStringUnconstrained) -> Result<Self, Self::Error> {
  138    138   
            let res: Result<::std::vec::Vec<crate::model::LengthPatternString>, (usize, crate::model::length_pattern_string::ConstraintViolation) > = value
  139    139   
                                        .0
  140    140   
                                        .into_iter()
  141    141   
                                        .enumerate()
  142    142   
                                        .map(|(idx, inner)| {
  143         -
                                            inner.try_into().map_err(|inner_violation| (idx, inner_violation))
         143  +
                                            inner.try_into()
         144  +
                                                    
         145  +
                                                    .map_err(|inner_violation| (idx, inner_violation))
  144    146   
                                        })
  145    147   
                                        .collect();
  146    148   
                                    let inner = res
  147    149   
                                        
  148    150   
                                        .map_err(|(idx, inner_violation)| Self::Error::Member(idx, inner_violation))?;
  149    151   
            Ok(Self(inner))
  150    152   
        }
  151    153   
    }
  152    154   
}
  153    155   
pub(crate) mod map_of_length_pattern_string_unconstrained {

tmp-codegen-diff/codegen-server-test/constraints_without_public_constrained_types/rust-server-codegen/src/unconstrained.rs

@@ -113,113 +173,175 @@
  133    133   
                        }
  134    134   
                    }
  135    135   
    impl std::convert::TryFrom<ListOfLengthPatternStringUnconstrained> for crate::constrained::list_of_length_pattern_string_constrained::ListOfLengthPatternStringConstrained {
  136    136   
        type Error = crate::model::list_of_length_pattern_string_internal::ConstraintViolation;
  137    137   
        fn try_from(value: ListOfLengthPatternStringUnconstrained) -> Result<Self, Self::Error> {
  138    138   
            let res: Result<::std::vec::Vec<crate::model::LengthPatternString>, (usize, crate::model::length_pattern_string_internal::ConstraintViolation) > = value
  139    139   
                                        .0
  140    140   
                                        .into_iter()
  141    141   
                                        .enumerate()
  142    142   
                                        .map(|(idx, inner)| {
  143         -
                                            inner.try_into().map_err(|inner_violation| (idx, inner_violation))
         143  +
                                            inner.try_into()
         144  +
                                                    
         145  +
                                                    .map_err(|inner_violation| (idx, inner_violation))
  144    146   
                                        })
  145    147   
                                        .collect();
  146    148   
                                    let inner = res
  147    149   
                                        
  148    150   
                                        .map_err(|(idx, inner_violation)| Self::Error::Member(idx, inner_violation))?;
  149    151   
            Ok(Self(inner))
  150    152   
        }
  151    153   
    }
  152    154   
}
  153    155   
pub(crate) mod map_of_length_pattern_string_unconstrained {
@@ -629,631 +689,693 @@
  649    651   
    impl std::convert::TryFrom<RecursiveListUnconstrained>
  650    652   
        for crate::constrained::recursive_list_constrained::RecursiveListConstrained
  651    653   
    {
  652    654   
        type Error = crate::model::recursive_list_internal::ConstraintViolation;
  653    655   
        fn try_from(value: RecursiveListUnconstrained) -> Result<Self, Self::Error> {
  654    656   
            let res: Result<::std::vec::Vec<crate::model::RecursiveShapesInputOutputNested1>, (usize, crate::model::recursive_shapes_input_output_nested1_internal::ConstraintViolation) > = value
  655    657   
                                        .0
  656    658   
                                        .into_iter()
  657    659   
                                        .enumerate()
  658    660   
                                        .map(|(idx, inner)| {
  659         -
                                            inner.try_into().map_err(|inner_violation| (idx, inner_violation))
         661  +
                                            inner.try_into()
         662  +
                                                    
         663  +
                                                    .map_err(|inner_violation| (idx, inner_violation))
  660    664   
                                        })
  661    665   
                                        .collect();
  662    666   
            let inner =
  663    667   
                res.map_err(|(idx, inner_violation)| Self::Error::Member(idx, inner_violation))?;
  664    668   
            Ok(Self(inner))
  665    669   
        }
  666    670   
    }
  667    671   
}
  668    672   
pub(crate) mod length_set_of_pattern_string_unconstrained {
  669    673   

tmp-codegen-diff/codegen-server-test/rpcv2Cbor/rust-server-codegen/src/operation.rs

@@ -159,159 +276,274 @@
  179    179   
  180    180   
    /// Serializes null values in maps
  181    181   
    /// Test ID: RpcV2CborSparseMapsSerializeNullValues
  182    182   
    #[::tokio::test]
  183    183   
    #[::tracing_test::traced_test]
  184    184   
    async fn rpc_v2_cbor_sparse_maps_serialize_null_values_request() {
  185    185   
        #[allow(unused_mut)]
  186    186   
        let mut http_request = http::Request::builder()
  187    187   
            .uri("/service/RpcV2Protocol/operation/SparseNullsOperation")
  188    188   
            .method("POST")
  189         -
            .header("Accept", "application/cbor")
  190    189   
            .header("Content-Type", "application/cbor")
  191    190   
            .header("smithy-protocol", "rpc-v2-cbor")
  192    191   
            .body(::aws_smithy_http_server::body::Body::from(
  193    192   
                ::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
  194    193   
                    "v29zcGFyc2VTdHJpbmdNYXC/Y2Zvb/b//w==".as_bytes(),
  195    194   
                    ::aws_smithy_protocol_test::MediaType::from("application/cbor"),
  196    195   
                )),
  197    196   
            ))
  198    197   
            .unwrap();
  199    198   
        #[allow(unused_mut)]
  200    199   
        let (sender, mut receiver) = ::tokio::sync::mpsc::channel(1);
  201    200   
        let config = crate::service::RpcV2ProtocolConfig::builder().build();
  202    201   
        let service =
  203    202   
            crate::service::RpcV2Protocol::builder::<::hyper::body::Body, _, _, _>(config)
  204    203   
                .sparse_nulls_operation(move |input: crate::input::SparseNullsOperationInput| {
  205    204   
                    let sender = sender.clone();
  206    205   
                    async move {
  207    206   
                        let result = {
  208    207   
                            let expected = crate::input::SparseNullsOperationInput {
  209    208   
                                sparse_string_map: ::std::option::Option::Some({
  210    209   
                                    let mut ret = ::std::collections::HashMap::new();
  211    210   
                                    ret.insert("foo".to_owned(), ::std::option::Option::None);
  212    211   
                                    ret
  213    212   
                                }),
  214    213   
                                sparse_string_list: ::std::option::Option::None,
  215    214   
                            };
  216    215   
                            ::pretty_assertions::assert_eq!(input, expected);
  217    216   
                            let output = crate::output::SparseNullsOperationOutput {
  218    217   
                                sparse_string_list: ::std::option::Option::None,
  219    218   
                                sparse_string_map: ::std::option::Option::None,
  220    219   
                            };
  221    220   
                            output
  222    221   
                        };
  223    222   
                        sender.send(()).await.expect("receiver dropped early");
  224    223   
                        result
  225    224   
                    }
  226    225   
                })
  227    226   
                .build_unchecked();
  228    227   
        let http_response = ::tower::ServiceExt::oneshot(service, http_request)
  229    228   
            .await
  230    229   
            .expect("unable to make an HTTP request");
  231    230   
        assert!(
  232    231   
            receiver.recv().await.is_some(),
  233    232   
            "we expected operation handler to be invoked but it was not entered"
  234    233   
        );
  235    234   
    }
  236    235   
  237    236   
    /// Serializes null values in lists
  238    237   
    /// Test ID: RpcV2CborSparseListsSerializeNull
  239    238   
    #[::tokio::test]
  240    239   
    #[::tracing_test::traced_test]
  241    240   
    async fn rpc_v2_cbor_sparse_lists_serialize_null_request() {
  242    241   
        #[allow(unused_mut)]
  243    242   
        let mut http_request = http::Request::builder()
  244    243   
            .uri("/service/RpcV2Protocol/operation/SparseNullsOperation")
  245    244   
            .method("POST")
  246         -
            .header("Accept", "application/cbor")
  247    245   
            .header("Content-Type", "application/cbor")
  248    246   
            .header("smithy-protocol", "rpc-v2-cbor")
  249    247   
            .body(::aws_smithy_http_server::body::Body::from(
  250    248   
                ::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
  251    249   
                    "v3BzcGFyc2VTdHJpbmdMaXN0n/b//w==".as_bytes(),
  252    250   
                    ::aws_smithy_protocol_test::MediaType::from("application/cbor"),
  253    251   
                )),
  254    252   
            ))
  255    253   
            .unwrap();
  256    254   
        #[allow(unused_mut)]
@@ -452,450 +512,509 @@
  472    470   
    /// Server populates default values when missing in request body.
  473    471   
    /// Test ID: RpcV2CborServerPopulatesDefaultsWhenMissingInRequestBody
  474    472   
    #[::tokio::test]
  475    473   
    #[::tracing_test::traced_test]
  476    474   
    #[should_panic]
  477    475   
    async fn rpc_v2_cbor_server_populates_defaults_when_missing_in_request_body_request() {
  478    476   
        #[allow(unused_mut)]
  479    477   
        let mut http_request = http::Request::builder()
  480    478   
            .uri("/service/RpcV2Protocol/operation/OperationWithDefaults")
  481    479   
            .method("POST")
  482         -
            .header("Accept", "application/cbor")
  483    480   
            .header("Content-Type", "application/cbor")
  484    481   
            .header("smithy-protocol", "rpc-v2-cbor")
  485    482   
            .body(::aws_smithy_http_server::body::Body::from(
  486    483   
                ::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
  487    484   
                    "v2hkZWZhdWx0c6D/".as_bytes(),
  488    485   
                    ::aws_smithy_protocol_test::MediaType::from("application/cbor"),
  489    486   
                )),
  490    487   
            ))
  491    488   
            .unwrap();
  492    489   
        #[allow(unused_mut)]
@@ -1014,1011 +1074,1070 @@
 1034   1031   
 1035   1032   
    /// Serializes recursive structures
 1036   1033   
    /// Test ID: RpcV2CborRecursiveShapes
 1037   1034   
    #[::tokio::test]
 1038   1035   
    #[::tracing_test::traced_test]
 1039   1036   
    async fn rpc_v2_cbor_recursive_shapes_request() {
 1040   1037   
        #[allow(unused_mut)]
 1041   1038   
                    let mut http_request = http::Request::builder()
 1042   1039   
                        .uri("/service/RpcV2Protocol/operation/RecursiveShapes")
 1043   1040   
                        .method("POST")
 1044         -
        .header("Accept", "application/cbor")
 1045   1041   
        .header("Content-Type", "application/cbor")
 1046   1042   
        .header("smithy-protocol", "rpc-v2-cbor")
 1047   1043   
        .body(::aws_smithy_http_server::body::Body::from(
 1048   1044   
                                ::bytes::Bytes::copy_from_slice(
 1049   1045   
                                    &::aws_smithy_protocol_test::decode_body_data("v2ZuZXN0ZWS/Y2Zvb2RGb28xZm5lc3RlZL9jYmFyZEJhcjFvcmVjdXJzaXZlTWVtYmVyv2Nmb29kRm9vMmZuZXN0ZWS/Y2JhcmRCYXIy//////8=".as_bytes(), ::aws_smithy_protocol_test::MediaType::from("application/cbor"))
 1050   1046   
                                )
 1051   1047   
                                )).unwrap();
 1052   1048   
        #[allow(unused_mut)]
 1053   1049   
        let (sender, mut receiver) = ::tokio::sync::mpsc::channel(1);
 1054   1050   
        let config = crate::service::RpcV2ProtocolConfig::builder().build();
@@ -1274,1270 +1334,1329 @@
 1294   1290   
 1295   1291   
    /// Serializes sparse maps
 1296   1292   
    /// Test ID: RpcV2CborSparseMaps
 1297   1293   
    #[::tokio::test]
 1298   1294   
    #[::tracing_test::traced_test]
 1299   1295   
    async fn rpc_v2_cbor_sparse_maps_request() {
 1300   1296   
        #[allow(unused_mut)]
 1301   1297   
        let mut http_request = http::Request::builder()
 1302   1298   
            .uri("/service/RpcV2Protocol/operation/RpcV2CborSparseMaps")
 1303   1299   
            .method("POST")
 1304         -
            .header("Accept", "application/cbor")
 1305   1300   
            .header("Content-Type", "application/cbor")
 1306   1301   
            .header("smithy-protocol", "rpc-v2-cbor")
 1307   1302   
            .body(::aws_smithy_http_server::body::Body::from(
 1308   1303   
                ::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
 1309   1304   
                    "v29zcGFyc2VTdHJ1Y3RNYXC/Y2Zvb79iaGlldGhlcmX/Y2Jher9iaGljYnll////".as_bytes(),
 1310   1305   
                    ::aws_smithy_protocol_test::MediaType::from("application/cbor"),
 1311   1306   
                )),
 1312   1307   
            ))
 1313   1308   
            .unwrap();
 1314   1309   
        #[allow(unused_mut)]
@@ -1348,1343 +1408,1402 @@
 1368   1363   
 1369   1364   
    /// Serializes null map values in sparse maps
 1370   1365   
    /// Test ID: RpcV2CborSerializesNullMapValues
 1371   1366   
    #[::tokio::test]
 1372   1367   
    #[::tracing_test::traced_test]
 1373   1368   
    async fn rpc_v2_cbor_serializes_null_map_values_request() {
 1374   1369   
        #[allow(unused_mut)]
 1375   1370   
                    let mut http_request = http::Request::builder()
 1376   1371   
                        .uri("/service/RpcV2Protocol/operation/RpcV2CborSparseMaps")
 1377   1372   
                        .method("POST")
 1378         -
        .header("Accept", "application/cbor")
 1379   1373   
        .header("Content-Type", "application/cbor")
 1380   1374   
        .header("smithy-protocol", "rpc-v2-cbor")
 1381   1375   
        .body(::aws_smithy_http_server::body::Body::from(
 1382   1376   
                                ::bytes::Bytes::copy_from_slice(
 1383   1377   
                                    &::aws_smithy_protocol_test::decode_body_data("v3BzcGFyc2VCb29sZWFuTWFwv2F49v9vc3BhcnNlTnVtYmVyTWFwv2F49v9vc3BhcnNlU3RyaW5nTWFwv2F49v9vc3BhcnNlU3RydWN0TWFwv2F49v//".as_bytes(), ::aws_smithy_protocol_test::MediaType::from("application/cbor"))
 1384   1378   
                                )
 1385   1379   
                                )).unwrap();
 1386   1380   
        #[allow(unused_mut)]
 1387   1381   
        let (sender, mut receiver) = ::tokio::sync::mpsc::channel(1);
 1388   1382   
        let config = crate::service::RpcV2ProtocolConfig::builder().build();
@@ -1421,1415 +1481,1474 @@
 1441   1435   
 1442   1436   
    /// A request that contains a sparse map of sets
 1443   1437   
    /// Test ID: RpcV2CborSerializesSparseSetMap
 1444   1438   
    #[::tokio::test]
 1445   1439   
    #[::tracing_test::traced_test]
 1446   1440   
    async fn rpc_v2_cbor_serializes_sparse_set_map_request() {
 1447   1441   
        #[allow(unused_mut)]
 1448   1442   
        let mut http_request = http::Request::builder()
 1449   1443   
            .uri("/service/RpcV2Protocol/operation/RpcV2CborSparseMaps")
 1450   1444   
            .method("POST")
 1451         -
            .header("Accept", "application/cbor")
 1452   1445   
            .header("Content-Type", "application/cbor")
 1453   1446   
            .header("smithy-protocol", "rpc-v2-cbor")
 1454   1447   
            .body(::aws_smithy_http_server::body::Body::from(
 1455   1448   
                ::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
 1456   1449   
                    "v2xzcGFyc2VTZXRNYXC/YXif/2F5n2FhYWL///8=".as_bytes(),
 1457   1450   
                    ::aws_smithy_protocol_test::MediaType::from("application/cbor"),
 1458   1451   
                )),
 1459   1452   
            ))
 1460   1453   
            .unwrap();
 1461   1454   
        #[allow(unused_mut)]
@@ -1497,1490 +1557,1549 @@
 1517   1510   
 1518   1511   
    /// A request that contains a sparse map of sets.
 1519   1512   
    /// Test ID: RpcV2CborSerializesSparseSetMapAndRetainsNull
 1520   1513   
    #[::tokio::test]
 1521   1514   
    #[::tracing_test::traced_test]
 1522   1515   
    async fn rpc_v2_cbor_serializes_sparse_set_map_and_retains_null_request() {
 1523   1516   
        #[allow(unused_mut)]
 1524   1517   
        let mut http_request = http::Request::builder()
 1525   1518   
            .uri("/service/RpcV2Protocol/operation/RpcV2CborSparseMaps")
 1526   1519   
            .method("POST")
 1527         -
            .header("Accept", "application/cbor")
 1528   1520   
            .header("Content-Type", "application/cbor")
 1529   1521   
            .header("smithy-protocol", "rpc-v2-cbor")
 1530   1522   
            .body(::aws_smithy_http_server::body::Body::from(
 1531   1523   
                ::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
 1532   1524   
                    "v2xzcGFyc2VTZXRNYXC/YXif/2F5n2FhYWL/YXr2//8=".as_bytes(),
 1533   1525   
                    ::aws_smithy_protocol_test::MediaType::from("application/cbor"),
 1534   1526   
                )),
 1535   1527   
            ))
 1536   1528   
            .unwrap();
 1537   1529   
        #[allow(unused_mut)]
@@ -1574,1566 +1634,1625 @@
 1594   1586   
 1595   1587   
    /// Ensure that 0 and false are sent over the wire in all maps and lists
 1596   1588   
    /// Test ID: RpcV2CborSerializesZeroValuesInSparseMaps
 1597   1589   
    #[::tokio::test]
 1598   1590   
    #[::tracing_test::traced_test]
 1599   1591   
    async fn rpc_v2_cbor_serializes_zero_values_in_sparse_maps_request() {
 1600   1592   
        #[allow(unused_mut)]
 1601   1593   
        let mut http_request = http::Request::builder()
 1602   1594   
            .uri("/service/RpcV2Protocol/operation/RpcV2CborSparseMaps")
 1603   1595   
            .method("POST")
 1604         -
            .header("Accept", "application/cbor")
 1605   1596   
            .header("Content-Type", "application/cbor")
 1606   1597   
            .header("smithy-protocol", "rpc-v2-cbor")
 1607   1598   
            .body(::aws_smithy_http_server::body::Body::from(
 1608   1599   
                ::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
 1609   1600   
                    "v29zcGFyc2VOdW1iZXJNYXC/YXgA/3BzcGFyc2VCb29sZWFuTWFwv2F49P//".as_bytes(),
 1610   1601   
                    ::aws_smithy_protocol_test::MediaType::from("application/cbor"),
 1611   1602   
                )),
 1612   1603   
            ))
 1613   1604   
            .unwrap();
 1614   1605   
        #[allow(unused_mut)]
@@ -2003,1994 +2063,2053 @@
 2023   2014   
 2024   2015   
    /// Serializes maps
 2025   2016   
    /// Test ID: RpcV2CborMaps
 2026   2017   
    #[::tokio::test]
 2027   2018   
    #[::tracing_test::traced_test]
 2028   2019   
    async fn rpc_v2_cbor_maps_request() {
 2029   2020   
        #[allow(unused_mut)]
 2030   2021   
        let mut http_request = http::Request::builder()
 2031   2022   
            .uri("/service/RpcV2Protocol/operation/RpcV2CborDenseMaps")
 2032   2023   
            .method("POST")
 2033         -
            .header("Accept", "application/cbor")
 2034   2024   
            .header("Content-Type", "application/cbor")
 2035   2025   
            .header("smithy-protocol", "rpc-v2-cbor")
 2036   2026   
            .body(::aws_smithy_http_server::body::Body::from(
 2037   2027   
                ::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
 2038   2028   
                    "oW5kZW5zZVN0cnVjdE1hcKJjZm9voWJoaWV0aGVyZWNiYXqhYmhpY2J5ZQ==".as_bytes(),
 2039   2029   
                    ::aws_smithy_protocol_test::MediaType::from("application/cbor"),
 2040   2030   
                )),
 2041   2031   
            ))
 2042   2032   
            .unwrap();
 2043   2033   
        #[allow(unused_mut)]
@@ -2077,2067 +2137,2126 @@
 2097   2087   
 2098   2088   
    /// Ensure that 0 and false are sent over the wire in all maps and lists
 2099   2089   
    /// Test ID: RpcV2CborSerializesZeroValuesInMaps
 2100   2090   
    #[::tokio::test]
 2101   2091   
    #[::tracing_test::traced_test]
 2102   2092   
    async fn rpc_v2_cbor_serializes_zero_values_in_maps_request() {
 2103   2093   
        #[allow(unused_mut)]
 2104   2094   
        let mut http_request = http::Request::builder()
 2105   2095   
            .uri("/service/RpcV2Protocol/operation/RpcV2CborDenseMaps")
 2106   2096   
            .method("POST")
 2107         -
            .header("Accept", "application/cbor")
 2108   2097   
            .header("Content-Type", "application/cbor")
 2109   2098   
            .header("smithy-protocol", "rpc-v2-cbor")
 2110   2099   
            .body(::aws_smithy_http_server::body::Body::from(
 2111   2100   
                ::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
 2112   2101   
                    "om5kZW5zZU51bWJlck1hcKFheABvZGVuc2VCb29sZWFuTWFwoWF49A==".as_bytes(),
 2113   2102   
                    ::aws_smithy_protocol_test::MediaType::from("application/cbor"),
 2114   2103   
                )),
 2115   2104   
            ))
 2116   2105   
            .unwrap();
 2117   2106   
        #[allow(unused_mut)]
@@ -2144,2133 +2204,2192 @@
 2164   2153   
 2165   2154   
    /// A request that contains a dense map of sets.
 2166   2155   
    /// Test ID: RpcV2CborSerializesDenseSetMap
 2167   2156   
    #[::tokio::test]
 2168   2157   
    #[::tracing_test::traced_test]
 2169   2158   
    async fn rpc_v2_cbor_serializes_dense_set_map_request() {
 2170   2159   
        #[allow(unused_mut)]
 2171   2160   
        let mut http_request = http::Request::builder()
 2172   2161   
            .uri("/service/RpcV2Protocol/operation/RpcV2CborDenseMaps")
 2173   2162   
            .method("POST")
 2174         -
            .header("Accept", "application/cbor")
 2175   2163   
            .header("Content-Type", "application/cbor")
 2176   2164   
            .header("smithy-protocol", "rpc-v2-cbor")
 2177   2165   
            .body(::aws_smithy_http_server::body::Body::from(
 2178   2166   
                ::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
 2179   2167   
                    "oWtkZW5zZVNldE1hcKJheIBheYJhYWFi".as_bytes(),
 2180   2168   
                    ::aws_smithy_protocol_test::MediaType::from("application/cbor"),
 2181   2169   
                )),
 2182   2170   
            ))
 2183   2171   
            .unwrap();
 2184   2172   
        #[allow(unused_mut)]
@@ -2478,2466 +2538,2525 @@
 2498   2486   
 2499   2487   
    /// Serializes RpcV2 Cbor lists
 2500   2488   
    /// Test ID: RpcV2CborLists
 2501   2489   
    #[::tokio::test]
 2502   2490   
    #[::tracing_test::traced_test]
 2503   2491   
    async fn rpc_v2_cbor_lists_request() {
 2504   2492   
        #[allow(unused_mut)]
 2505   2493   
                    let mut http_request = http::Request::builder()
 2506   2494   
                        .uri("/service/RpcV2Protocol/operation/RpcV2CborLists")
 2507   2495   
                        .method("POST")
 2508         -
        .header("Accept", "application/cbor")
 2509   2496   
        .header("Content-Type", "application/cbor")
 2510   2497   
        .header("smithy-protocol", "rpc-v2-cbor")
 2511   2498   
        .body(::aws_smithy_http_server::body::Body::from(
 2512   2499   
                                ::bytes::Bytes::copy_from_slice(
 2513   2500   
                                    &::aws_smithy_protocol_test::decode_body_data("v2pzdHJpbmdMaXN0gmNmb29jYmFyaXN0cmluZ1NldIJjZm9vY2JhcmtpbnRlZ2VyTGlzdIIBAmtib29sZWFuTGlzdIL19G10aW1lc3RhbXBMaXN0gsH7QdTX+/OAAADB+0HU1/vzgAAAaGVudW1MaXN0gmNGb29hMGtpbnRFbnVtTGlzdIIBAnBuZXN0ZWRTdHJpbmdMaXN0goJjZm9vY2JhcoJjYmF6Y3F1eG1zdHJ1Y3R1cmVMaXN0gqJhYWExYWJhMqJhYWEzYWJhNGhibG9iTGlzdIJDZm9vQ2Jhcv8=".as_bytes(), ::aws_smithy_protocol_test::MediaType::from("application/cbor"))
 2514   2501   
                                )
 2515   2502   
                                )).unwrap();
 2516   2503   
        #[allow(unused_mut)]
 2517   2504   
        let (sender, mut receiver) = ::tokio::sync::mpsc::channel(1);
 2518   2505   
        let config = crate::service::RpcV2ProtocolConfig::builder().build();
@@ -2580,2567 +2640,2626 @@
 2600   2587   
 2601   2588   
    /// Serializes empty JSON lists
 2602   2589   
    /// Test ID: RpcV2CborListsEmpty
 2603   2590   
    #[::tokio::test]
 2604   2591   
    #[::tracing_test::traced_test]
 2605   2592   
    async fn rpc_v2_cbor_lists_empty_request() {
 2606   2593   
        #[allow(unused_mut)]
 2607   2594   
        let mut http_request = http::Request::builder()
 2608   2595   
            .uri("/service/RpcV2Protocol/operation/RpcV2CborLists")
 2609   2596   
            .method("POST")
 2610         -
            .header("Accept", "application/cbor")
 2611   2597   
            .header("Content-Type", "application/cbor")
 2612   2598   
            .header("smithy-protocol", "rpc-v2-cbor")
 2613   2599   
            .body(::aws_smithy_http_server::body::Body::from(
 2614   2600   
                ::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
 2615   2601   
                    "v2pzdHJpbmdMaXN0n///".as_bytes(),
 2616   2602   
                    ::aws_smithy_protocol_test::MediaType::from("application/cbor"),
 2617   2603   
                )),
 2618   2604   
            ))
 2619   2605   
            .unwrap();
 2620   2606   
        #[allow(unused_mut)]
@@ -2649,2635 +2709,2694 @@
 2669   2655   
 2670   2656   
    /// Serializes empty JSON definite length lists
 2671   2657   
    /// Test ID: RpcV2CborListsEmptyUsingDefiniteLength
 2672   2658   
    #[::tokio::test]
 2673   2659   
    #[::tracing_test::traced_test]
 2674   2660   
    async fn rpc_v2_cbor_lists_empty_using_definite_length_request() {
 2675   2661   
        #[allow(unused_mut)]
 2676   2662   
        let mut http_request = http::Request::builder()
 2677   2663   
            .uri("/service/RpcV2Protocol/operation/RpcV2CborLists")
 2678   2664   
            .method("POST")
 2679         -
            .header("Accept", "application/cbor")
 2680   2665   
            .header("Content-Type", "application/cbor")
 2681   2666   
            .header("smithy-protocol", "rpc-v2-cbor")
 2682   2667   
            .body(::aws_smithy_http_server::body::Body::from(
 2683   2668   
                ::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
 2684   2669   
                    "oWpzdHJpbmdMaXN0gA==".as_bytes(),
 2685   2670   
                    ::aws_smithy_protocol_test::MediaType::from("application/cbor"),
 2686   2671   
                )),
 2687   2672   
            ))
 2688   2673   
            .unwrap();
 2689   2674   
        #[allow(unused_mut)]
@@ -2718,2703 +2778,2762 @@
 2738   2723   
 2739   2724   
    /// Can deserialize indefinite length text strings inside an indefinite length list
 2740   2725   
    /// Test ID: RpcV2CborIndefiniteStringInsideIndefiniteList
 2741   2726   
    #[::tokio::test]
 2742   2727   
    #[::tracing_test::traced_test]
 2743   2728   
    async fn rpc_v2_cbor_indefinite_string_inside_indefinite_list_request() {
 2744   2729   
        #[allow(unused_mut)]
 2745   2730   
                    let mut http_request = http::Request::builder()
 2746   2731   
                        .uri("/service/RpcV2Protocol/operation/RpcV2CborLists")
 2747   2732   
                        .method("POST")
 2748         -
        .header("Accept", "application/cbor")
 2749   2733   
        .header("Content-Type", "application/cbor")
 2750   2734   
        .header("smithy-protocol", "rpc-v2-cbor")
 2751   2735   
        .body(::aws_smithy_http_server::body::Body::from(
 2752   2736   
                                ::bytes::Bytes::copy_from_slice(
 2753   2737   
                                    &::aws_smithy_protocol_test::decode_body_data("v2pzdHJpbmdMaXN0n394HUFuIGV4YW1wbGUgaW5kZWZpbml0ZSBzdHJpbmcsdyB3aGljaCB3aWxsIGJlIGNodW5rZWQsbiBvbiBlYWNoIGNvbW1h/394NUFub3RoZXIgZXhhbXBsZSBpbmRlZmluaXRlIHN0cmluZyB3aXRoIG9ubHkgb25lIGNodW5r/3ZUaGlzIGlzIGEgcGxhaW4gc3RyaW5n//8=".as_bytes(), ::aws_smithy_protocol_test::MediaType::from("application/cbor"))
 2754   2738   
                                )
 2755   2739   
                                )).unwrap();
 2756   2740   
        #[allow(unused_mut)]
 2757   2741   
        let (sender, mut receiver) = ::tokio::sync::mpsc::channel(1);
 2758   2742   
        let config = crate::service::RpcV2ProtocolConfig::builder().build();
@@ -2791,2775 +2851,2834 @@
 2811   2795   
 2812   2796   
    /// Can deserialize indefinite length text strings inside a definite length list
 2813   2797   
    /// Test ID: RpcV2CborIndefiniteStringInsideDefiniteList
 2814   2798   
    #[::tokio::test]
 2815   2799   
    #[::tracing_test::traced_test]
 2816   2800   
    async fn rpc_v2_cbor_indefinite_string_inside_definite_list_request() {
 2817   2801   
        #[allow(unused_mut)]
 2818   2802   
                    let mut http_request = http::Request::builder()
 2819   2803   
                        .uri("/service/RpcV2Protocol/operation/RpcV2CborLists")
 2820   2804   
                        .method("POST")
 2821         -
        .header("Accept", "application/cbor")
 2822   2805   
        .header("Content-Type", "application/cbor")
 2823   2806   
        .header("smithy-protocol", "rpc-v2-cbor")
 2824   2807   
        .body(::aws_smithy_http_server::body::Body::from(
 2825   2808   
                                ::bytes::Bytes::copy_from_slice(
 2826   2809   
                                    &::aws_smithy_protocol_test::decode_body_data("oWpzdHJpbmdMaXN0g394HUFuIGV4YW1wbGUgaW5kZWZpbml0ZSBzdHJpbmcsdyB3aGljaCB3aWxsIGJlIGNodW5rZWQsbiBvbiBlYWNoIGNvbW1h/394NUFub3RoZXIgZXhhbXBsZSBpbmRlZmluaXRlIHN0cmluZyB3aXRoIG9ubHkgb25lIGNodW5r/3ZUaGlzIGlzIGEgcGxhaW4gc3RyaW5n".as_bytes(), ::aws_smithy_protocol_test::MediaType::from("application/cbor"))
 2827   2810   
                                )
 2828   2811   
                                )).unwrap();
 2829   2812   
        #[allow(unused_mut)]
 2830   2813   
        let (sender, mut receiver) = ::tokio::sync::mpsc::channel(1);
 2831   2814   
        let config = crate::service::RpcV2ProtocolConfig::builder().build();
@@ -3064,3047 +3124,3106 @@
 3084   3067   
 3085   3068   
    /// Serializes simple scalar properties
 3086   3069   
    /// Test ID: RpcV2CborSimpleScalarProperties
 3087   3070   
    #[::tokio::test]
 3088   3071   
    #[::tracing_test::traced_test]
 3089   3072   
    async fn rpc_v2_cbor_simple_scalar_properties_request() {
 3090   3073   
        #[allow(unused_mut)]
 3091   3074   
                    let mut http_request = http::Request::builder()
 3092   3075   
                        .uri("/service/RpcV2Protocol/operation/SimpleScalarProperties")
 3093   3076   
                        .method("POST")
 3094         -
        .header("Accept", "application/cbor")
 3095   3077   
        .header("Content-Type", "application/cbor")
 3096   3078   
        .header("smithy-protocol", "rpc-v2-cbor")
 3097   3079   
        .body(::aws_smithy_http_server::body::Body::from(
 3098   3080   
                                ::bytes::Bytes::copy_from_slice(
 3099   3081   
                                    &::aws_smithy_protocol_test::decode_body_data("v2lieXRlVmFsdWUFa2RvdWJsZVZhbHVl+z/+OVgQYk3TcWZhbHNlQm9vbGVhblZhbHVl9GpmbG9hdFZhbHVl+kD0AABsaW50ZWdlclZhbHVlGQEAaWxvbmdWYWx1ZRkmkWpzaG9ydFZhbHVlGSaqa3N0cmluZ1ZhbHVlZnNpbXBsZXB0cnVlQm9vbGVhblZhbHVl9WlibG9iVmFsdWVDZm9v/w==".as_bytes(), ::aws_smithy_protocol_test::MediaType::from("application/cbor"))
 3100   3082   
                                )
 3101   3083   
                                )).unwrap();
 3102   3084   
        #[allow(unused_mut)]
 3103   3085   
        let (sender, mut receiver) = ::tokio::sync::mpsc::channel(1);
 3104   3086   
        let config = crate::service::RpcV2ProtocolConfig::builder().build();
@@ -3189,3171 +3249,3230 @@
 3209   3191   
    /// encoded using a map with a definite length. The server should also be able to parse
 3210   3192   
    /// a key encoded using an indefinite length string.
 3211   3193   
    /// Test ID: RpcV2CborSimpleScalarPropertiesUsingIndefiniteLength
 3212   3194   
    #[::tokio::test]
 3213   3195   
    #[::tracing_test::traced_test]
 3214   3196   
    async fn rpc_v2_cbor_simple_scalar_properties_using_indefinite_length_request() {
 3215   3197   
        #[allow(unused_mut)]
 3216   3198   
                    let mut http_request = http::Request::builder()
 3217   3199   
                        .uri("/service/RpcV2Protocol/operation/SimpleScalarProperties")
 3218   3200   
                        .method("POST")
 3219         -
        .header("Accept", "application/cbor")
 3220   3201   
        .header("Content-Type", "application/cbor")
 3221   3202   
        .header("smithy-protocol", "rpc-v2-cbor")
 3222   3203   
        .body(::aws_smithy_http_server::body::Body::from(
 3223   3204   
                                ::bytes::Bytes::copy_from_slice(
 3224   3205   
                                    &::aws_smithy_protocol_test::decode_body_data("qmlieXRlVmFsdWUFf2Zkb3VibGVlVmFsdWX/+z/+OVgQYk3Tf2VmYWxzZWdCb29sZWFuZVZhbHVl//RqZmxvYXRWYWx1ZfpA9AAAbGludGVnZXJWYWx1ZRkBAGlsb25nVmFsdWUZJpFqc2hvcnRWYWx1ZRkmqn9mc3RyaW5nZVZhbHVl/2ZzaW1wbGVwdHJ1ZUJvb2xlYW5WYWx1ZfVpYmxvYlZhbHVlQ2Zvbw==".as_bytes(), ::aws_smithy_protocol_test::MediaType::from("application/cbor"))
 3225   3206   
                                )
 3226   3207   
                                )).unwrap();
 3227   3208   
        #[allow(unused_mut)]
 3228   3209   
        let (sender, mut receiver) = ::tokio::sync::mpsc::channel(1);
 3229   3210   
        let config = crate::service::RpcV2ProtocolConfig::builder().build();
@@ -3312,3293 +3372,3352 @@
 3332   3313   
 3333   3314   
    /// RpcV2 Cbor should not deserialize null structure values
 3334   3315   
    /// Test ID: RpcV2CborServerDoesntDeSerializeNullStructureValues
 3335   3316   
    #[::tokio::test]
 3336   3317   
    #[::tracing_test::traced_test]
 3337   3318   
    async fn rpc_v2_cbor_server_doesnt_de_serialize_null_structure_values_request() {
 3338   3319   
        #[allow(unused_mut)]
 3339   3320   
        let mut http_request = http::Request::builder()
 3340   3321   
            .uri("/service/RpcV2Protocol/operation/SimpleScalarProperties")
 3341   3322   
            .method("POST")
 3342         -
            .header("Accept", "application/cbor")
 3343   3323   
            .header("Content-Type", "application/cbor")
 3344   3324   
            .header("smithy-protocol", "rpc-v2-cbor")
 3345   3325   
            .body(::aws_smithy_http_server::body::Body::from(
 3346   3326   
                ::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
 3347   3327   
                    "v2tzdHJpbmdWYWx1Zfb/".as_bytes(),
 3348   3328   
                    ::aws_smithy_protocol_test::MediaType::from("application/cbor"),
 3349   3329   
                )),
 3350   3330   
            ))
 3351   3331   
            .unwrap();
 3352   3332   
        #[allow(unused_mut)]
@@ -3435,3415 +3495,3474 @@
 3455   3435   
 3456   3436   
    /// Supports handling NaN float values.
 3457   3437   
    /// Test ID: RpcV2CborSupportsNaNFloatInputs
 3458   3438   
    #[::tokio::test]
 3459   3439   
    #[::tracing_test::traced_test]
 3460   3440   
    async fn rpc_v2_cbor_supports_na_n_float_inputs_request() {
 3461   3441   
        #[allow(unused_mut)]
 3462   3442   
        let mut http_request = http::Request::builder()
 3463   3443   
            .uri("/service/RpcV2Protocol/operation/SimpleScalarProperties")
 3464   3444   
            .method("POST")
 3465         -
            .header("Accept", "application/cbor")
 3466   3445   
            .header("Content-Type", "application/cbor")
 3467   3446   
            .header("smithy-protocol", "rpc-v2-cbor")
 3468   3447   
            .body(::aws_smithy_http_server::body::Body::from(
 3469   3448   
                ::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
 3470   3449   
                    "v2tkb3VibGVWYWx1Zft/+AAAAAAAAGpmbG9hdFZhbHVl+n/AAAD/".as_bytes(),
 3471   3450   
                    ::aws_smithy_protocol_test::MediaType::from("application/cbor"),
 3472   3451   
                )),
 3473   3452   
            ))
 3474   3453   
            .unwrap();
 3475   3454   
        #[allow(unused_mut)]
@@ -3567,3546 +3627,3605 @@
 3587   3566   
 3588   3567   
    /// Supports handling Infinity float values.
 3589   3568   
    /// Test ID: RpcV2CborSupportsInfinityFloatInputs
 3590   3569   
    #[::tokio::test]
 3591   3570   
    #[::tracing_test::traced_test]
 3592   3571   
    async fn rpc_v2_cbor_supports_infinity_float_inputs_request() {
 3593   3572   
        #[allow(unused_mut)]
 3594   3573   
        let mut http_request = http::Request::builder()
 3595   3574   
            .uri("/service/RpcV2Protocol/operation/SimpleScalarProperties")
 3596   3575   
            .method("POST")
 3597         -
            .header("Accept", "application/cbor")
 3598   3576   
            .header("Content-Type", "application/cbor")
 3599   3577   
            .header("smithy-protocol", "rpc-v2-cbor")
 3600   3578   
            .body(::aws_smithy_http_server::body::Body::from(
 3601   3579   
                ::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
 3602   3580   
                    "v2tkb3VibGVWYWx1Zft/8AAAAAAAAGpmbG9hdFZhbHVl+n+AAAD/".as_bytes(),
 3603   3581   
                    ::aws_smithy_protocol_test::MediaType::from("application/cbor"),
 3604   3582   
                )),
 3605   3583   
            ))
 3606   3584   
            .unwrap();
 3607   3585   
        #[allow(unused_mut)]
@@ -3699,3677 +3759,3736 @@
 3719   3697   
 3720   3698   
    /// Supports handling Infinity float values.
 3721   3699   
    /// Test ID: RpcV2CborSupportsNegativeInfinityFloatInputs
 3722   3700   
    #[::tokio::test]
 3723   3701   
    #[::tracing_test::traced_test]
 3724   3702   
    async fn rpc_v2_cbor_supports_negative_infinity_float_inputs_request() {
 3725   3703   
        #[allow(unused_mut)]
 3726   3704   
        let mut http_request = http::Request::builder()
 3727   3705   
            .uri("/service/RpcV2Protocol/operation/SimpleScalarProperties")
 3728   3706   
            .method("POST")
 3729         -
            .header("Accept", "application/cbor")
 3730   3707   
            .header("Content-Type", "application/cbor")
 3731   3708   
            .header("smithy-protocol", "rpc-v2-cbor")
 3732   3709   
            .body(::aws_smithy_http_server::body::Body::from(
 3733   3710   
                ::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
 3734   3711   
                    "v2tkb3VibGVWYWx1Zfv/8AAAAAAAAGpmbG9hdFZhbHVl+v+AAAD/".as_bytes(),
 3735   3712   
                    ::aws_smithy_protocol_test::MediaType::from("application/cbor"),
 3736   3713   
                )),
 3737   3714   
            ))
 3738   3715   
            .unwrap();
 3739   3716   
        #[allow(unused_mut)]
@@ -3831,3808 +3891,3867 @@
 3851   3828   
 3852   3829   
    /// The server should be capable of deserializing indefinite length text strings.
 3853   3830   
    /// Test ID: RpcV2CborIndefiniteLengthStringsCanBeDeserialized
 3854   3831   
    #[::tokio::test]
 3855   3832   
    #[::tracing_test::traced_test]
 3856   3833   
    async fn rpc_v2_cbor_indefinite_length_strings_can_be_deserialized_request() {
 3857   3834   
        #[allow(unused_mut)]
 3858   3835   
                    let mut http_request = http::Request::builder()
 3859   3836   
                        .uri("/service/RpcV2Protocol/operation/SimpleScalarProperties")
 3860   3837   
                        .method("POST")
 3861         -
        .header("Accept", "application/cbor")
 3862   3838   
        .header("Content-Type", "application/cbor")
 3863   3839   
        .header("smithy-protocol", "rpc-v2-cbor")
 3864   3840   
        .body(::aws_smithy_http_server::body::Body::from(
 3865   3841   
                                ::bytes::Bytes::copy_from_slice(
 3866   3842   
                                    &::aws_smithy_protocol_test::decode_body_data("oWtzdHJpbmdWYWx1ZX94HUFuIGV4YW1wbGUgaW5kZWZpbml0ZSBzdHJpbmcscSBjaHVua2VkIG9uIGNvbW1h/w==".as_bytes(), ::aws_smithy_protocol_test::MediaType::from("application/cbor"))
 3867   3843   
                                )
 3868   3844   
                                )).unwrap();
 3869   3845   
        #[allow(unused_mut)]
 3870   3846   
        let (sender, mut receiver) = ::tokio::sync::mpsc::channel(1);
 3871   3847   
        let config = crate::service::RpcV2ProtocolConfig::builder().build();
@@ -3954,3930 +4014,3989 @@
 3974   3950   
 3975   3951   
    /// The server should be capable of deserializing indefinite length byte strings.
 3976   3952   
    /// Test ID: RpcV2CborIndefiniteLengthByteStringsCanBeDeserialized
 3977   3953   
    #[::tokio::test]
 3978   3954   
    #[::tracing_test::traced_test]
 3979   3955   
    async fn rpc_v2_cbor_indefinite_length_byte_strings_can_be_deserialized_request() {
 3980   3956   
        #[allow(unused_mut)]
 3981   3957   
                    let mut http_request = http::Request::builder()
 3982   3958   
                        .uri("/service/RpcV2Protocol/operation/SimpleScalarProperties")
 3983   3959   
                        .method("POST")
 3984         -
        .header("Accept", "application/cbor")
 3985   3960   
        .header("Content-Type", "application/cbor")
 3986   3961   
        .header("smithy-protocol", "rpc-v2-cbor")
 3987   3962   
        .body(::aws_smithy_http_server::body::Body::from(
 3988   3963   
                                ::bytes::Bytes::copy_from_slice(
 3989   3964   
                                    &::aws_smithy_protocol_test::decode_body_data("oWlibG9iVmFsdWVfWCJBbiBleGFtcGxlIGluZGVmaW5pdGUtYnl0ZSBzdHJpbmcsUSBjaHVua2VkIG9uIGNvbW1h/w==".as_bytes(), ::aws_smithy_protocol_test::MediaType::from("application/cbor"))
 3990   3965   
                                )
 3991   3966   
                                )).unwrap();
 3992   3967   
        #[allow(unused_mut)]
 3993   3968   
        let (sender, mut receiver) = ::tokio::sync::mpsc::channel(1);
 3994   3969   
        let config = crate::service::RpcV2ProtocolConfig::builder().build();
@@ -4079,4054 +4139,4113 @@
 4099   4074   
 4100   4075   
    /// Supports upcasting from a smaller byte representation of the same data type.
 4101   4076   
    /// Test ID: RpcV2CborSupportsUpcastingData
 4102   4077   
    #[::tokio::test]
 4103   4078   
    #[::tracing_test::traced_test]
 4104   4079   
    async fn rpc_v2_cbor_supports_upcasting_data_request() {
 4105   4080   
        #[allow(unused_mut)]
 4106   4081   
                    let mut http_request = http::Request::builder()
 4107   4082   
                        .uri("/service/RpcV2Protocol/operation/SimpleScalarProperties")
 4108   4083   
                        .method("POST")
 4109         -
        .header("Accept", "application/cbor")
 4110   4084   
        .header("Content-Type", "application/cbor")
 4111   4085   
        .header("smithy-protocol", "rpc-v2-cbor")
 4112   4086   
        .body(::aws_smithy_http_server::body::Body::from(
 4113   4087   
                                ::bytes::Bytes::copy_from_slice(
 4114   4088   
                                    &::aws_smithy_protocol_test::decode_body_data("v2tkb3VibGVWYWx1Zfk+AGpmbG9hdFZhbHVl+UegbGludGVnZXJWYWx1ZRg4aWxvbmdWYWx1ZRkBAGpzaG9ydFZhbHVlCv8=".as_bytes(), ::aws_smithy_protocol_test::MediaType::from("application/cbor"))
 4115   4089   
                                )
 4116   4090   
                                )).unwrap();
 4117   4091   
        #[allow(unused_mut)]
 4118   4092   
        let (sender, mut receiver) = ::tokio::sync::mpsc::channel(1);
 4119   4093   
        let config = crate::service::RpcV2ProtocolConfig::builder().build();
@@ -4202,4176 +4262,4235 @@
 4222   4196   
    /// client generated against a newer Smithy model to be able to communicate with a server that is
 4223   4197   
    /// generated against an older Smithy model.
 4224   4198   
    /// Test ID: RpcV2CborExtraFieldsInTheBodyShouldBeSkippedByServers
 4225   4199   
    #[::tokio::test]
 4226   4200   
    #[::tracing_test::traced_test]
 4227   4201   
    async fn rpc_v2_cbor_extra_fields_in_the_body_should_be_skipped_by_servers_request() {
 4228   4202   
        #[allow(unused_mut)]
 4229   4203   
                    let mut http_request = http::Request::builder()
 4230   4204   
                        .uri("/service/RpcV2Protocol/operation/SimpleScalarProperties")
 4231   4205   
                        .method("POST")
 4232         -
        .header("Accept", "application/cbor")
 4233   4206   
        .header("Content-Type", "application/cbor")
 4234   4207   
        .header("smithy-protocol", "rpc-v2-cbor")
 4235   4208   
        .body(::aws_smithy_http_server::body::Body::from(
 4236   4209   
                                ::bytes::Bytes::copy_from_slice(
 4237   4210   
                                    &::aws_smithy_protocol_test::decode_body_data("v2lieXRlVmFsdWUFa2RvdWJsZVZhbHVl+z/+OVgQYk3TcWZhbHNlQm9vbGVhblZhbHVl9GpmbG9hdFZhbHVl+kD0AABrZXh0cmFPYmplY3S/c2luZGVmaW5pdGVMZW5ndGhNYXC/a3dpdGhBbkFycmF5nwECA///cWRlZmluaXRlTGVuZ3RoTWFwo3J3aXRoQURlZmluaXRlQXJyYXmDAQIDeB1hbmRTb21lSW5kZWZpbml0ZUxlbmd0aFN0cmluZ3gfdGhhdCBoYXMsIGJlZW4gY2h1bmtlZCBvbiBjb21tYWxub3JtYWxTdHJpbmdjZm9vanNob3J0VmFsdWUZJw9uc29tZU90aGVyRmllbGR2dGhpcyBzaG91bGQgYmUgc2tpcHBlZP9saW50ZWdlclZhbHVlGQEAaWxvbmdWYWx1ZRkmkWpzaG9ydFZhbHVlGSaqa3N0cmluZ1ZhbHVlZnNpbXBsZXB0cnVlQm9vbGVhblZhbHVl9WlibG9iVmFsdWVDZm9v/w==".as_bytes(), ::aws_smithy_protocol_test::MediaType::from("application/cbor"))
 4238   4211   
                                )
 4239   4212   
                                )).unwrap();
 4240   4213   
        #[allow(unused_mut)]
 4241   4214   
        let (sender, mut receiver) = ::tokio::sync::mpsc::channel(1);
 4242   4215   
        let config = crate::service::RpcV2ProtocolConfig::builder().build();
@@ -4316,4289 +4497,4348 @@
 4336   4309   
                .build_unchecked();
 4337   4310   
        let http_response = ::tower::ServiceExt::oneshot(service, http_request)
 4338   4311   
            .await
 4339   4312   
            .expect("unable to make an HTTP request");
 4340   4313   
        assert!(
 4341   4314   
            receiver.recv().await.is_some(),
 4342   4315   
            "we expected operation handler to be invoked but it was not entered"
 4343   4316   
        );
 4344   4317   
    }
 4345   4318   
 4346         -
    /// Servers should tolerate requests without an Accept header set.
 4347         -
    /// Test ID: RpcV2CborServersShouldHandleNoAcceptHeader
 4348         -
    #[::tokio::test]
 4349         -
    #[::tracing_test::traced_test]
 4350         -
    async fn rpc_v2_cbor_servers_should_handle_no_accept_header_request() {
 4351         -
        #[allow(unused_mut)]
 4352         -
                    let mut http_request = http::Request::builder()
 4353         -
                        .uri("/service/RpcV2Protocol/operation/SimpleScalarProperties")
 4354         -
                        .method("POST")
 4355         -
        .header("Content-Type", "application/cbor")
 4356         -
        .header("smithy-protocol", "rpc-v2-cbor")
 4357         -
        .body(::aws_smithy_http_server::body::Body::from(
 4358         -
                                ::bytes::Bytes::copy_from_slice(
 4359         -
                                    &::aws_smithy_protocol_test::decode_body_data("v2lieXRlVmFsdWUFa2RvdWJsZVZhbHVl+z/+OVgQYk3TcWZhbHNlQm9vbGVhblZhbHVl9GpmbG9hdFZhbHVl+kD0AABsaW50ZWdlclZhbHVlGQEAaWxvbmdWYWx1ZRkmkWpzaG9ydFZhbHVlGSaqa3N0cmluZ1ZhbHVlZnNpbXBsZXB0cnVlQm9vbGVhblZhbHVl9WlibG9iVmFsdWVDZm9v/w==".as_bytes(), ::aws_smithy_protocol_test::MediaType::from("application/cbor"))
 4360         -
                                )
 4361         -
                                )).unwrap();
 4362         -
        #[allow(unused_mut)]
 4363         -
        let (sender, mut receiver) = ::tokio::sync::mpsc::channel(1);
 4364         -
        let config = crate::service::RpcV2ProtocolConfig::builder().build();
 4365         -
        let service =
 4366         -
            crate::service::RpcV2Protocol::builder::<::hyper::body::Body, _, _, _>(config)
 4367         -
                .simple_scalar_properties(
 4368         -
                    move |input: crate::input::SimpleScalarPropertiesInput| {
 4369         -
                        let sender = sender.clone();
 4370         -
                        async move {
 4371         -
                            let result = {
 4372         -
                                use ::aws_smithy_protocol_test::FloatEquals;
 4373         -
                                let expected = crate::input::SimpleScalarPropertiesInput {
 4374         -
                                    byte_value: ::std::option::Option::Some(5),
 4375         -
                                    double_value: ::std::option::Option::Some(1.889_f64),
 4376         -
                                    false_boolean_value: ::std::option::Option::Some(false),
 4377         -
                                    float_value: ::std::option::Option::Some(7.625_f32),
 4378         -
                                    integer_value: ::std::option::Option::Some(256),
 4379         -
                                    long_value: ::std::option::Option::Some(9873),
 4380         -
                                    short_value: ::std::option::Option::Some(9898),
 4381         -
                                    string_value: ::std::option::Option::Some("simple".to_owned()),
 4382         -
                                    true_boolean_value: ::std::option::Option::Some(true),
 4383         -
                                    blob_value: ::std::option::Option::Some(
 4384         -
                                        ::aws_smithy_types::Blob::new("foo"),
 4385         -
                                    ),
 4386         -
                                };
 4387         -
                                ::pretty_assertions::assert_eq!(
 4388         -
                                    input.true_boolean_value,
 4389         -
                                    expected.true_boolean_value,
 4390         -
                                    "Unexpected value for `true_boolean_value`"
 4391         -
                                );
 4392         -
                                ::pretty_assertions::assert_eq!(
 4393         -
                                    input.false_boolean_value,
 4394         -
                                    expected.false_boolean_value,
 4395         -
                                    "Unexpected value for `false_boolean_value`"
 4396         -
                                );
 4397         -
                                ::pretty_assertions::assert_eq!(
 4398         -
                                    input.byte_value,
 4399         -
                                    expected.byte_value,
 4400         -
                                    "Unexpected value for `byte_value`"
 4401         -
                                );
 4402         -
                                assert!(
 4403         -
                                    input.double_value.float_equals(&expected.double_value),
 4404         -
                                    "Unexpected value for `double_value` {:?} vs. {:?}",
 4405         -
                                    expected.double_value,
 4406         -
                                    input.double_value
 4407         -
                                );
 4408         -
                                assert!(
 4409         -
                                    input.float_value.float_equals(&expected.float_value),
 4410         -
                                    "Unexpected value for `float_value` {:?} vs. {:?}",
 4411         -
                                    expected.float_value,
 4412         -
                                    input.float_value
 4413         -
                                );
 4414         -
                                ::pretty_assertions::assert_eq!(
 4415         -
                                    input.integer_value,
 4416         -
                                    expected.integer_value,
 4417         -
                                    "Unexpected value for `integer_value`"
 4418         -
                                );
 4419         -
                                ::pretty_assertions::assert_eq!(
 4420         -
                                    input.long_value,
 4421         -
                                    expected.long_value,
 4422         -
                                    "Unexpected value for `long_value`"
 4423         -
                                );
 4424         -
                                ::pretty_assertions::assert_eq!(
 4425         -
                                    input.short_value,
 4426         -
                                    expected.short_value,
 4427         -
                                    "Unexpected value for `short_value`"
 4428         -
                                );
 4429         -
                                ::pretty_assertions::assert_eq!(
 4430         -
                                    input.string_value,
 4431         -
                                    expected.string_value,
 4432         -
                                    "Unexpected value for `string_value`"
 4433         -
                                );
 4434         -
                                ::pretty_assertions::assert_eq!(
 4435         -
                                    input.blob_value,
 4436         -
                                    expected.blob_value,
 4437         -
                                    "Unexpected value for `blob_value`"
 4438         -
                                );
 4439         -
                                let output = crate::output::SimpleScalarPropertiesOutput {
 4440         -
                                    true_boolean_value: ::std::option::Option::None,
 4441         -
                                    false_boolean_value: ::std::option::Option::None,
 4442         -
                                    byte_value: ::std::option::Option::None,
 4443         -
                                    double_value: ::std::option::Option::None,
 4444         -
                                    float_value: ::std::option::Option::None,
 4445         -
                                    integer_value: ::std::option::Option::None,
 4446         -
                                    long_value: ::std::option::Option::None,
 4447         -
                                    short_value: ::std::option::Option::None,
 4448         -
                                    string_value: ::std::option::Option::None,
 4449         -
                                    blob_value: ::std::option::Option::None,
 4450         -
                                };
 4451         -
                                output
 4452         -
                            };
 4453         -
                            sender.send(()).await.expect("receiver dropped early");
 4454         -
                            result
 4455         -
                        }
 4456         -
                    },
 4457         -
                )
 4458         -
                .build_unchecked();
 4459         -
        let http_response = ::tower::ServiceExt::oneshot(service, http_request)
 4460         -
            .await
 4461         -
            .expect("unable to make an HTTP request");
 4462         -
        assert!(
 4463         -
            receiver.recv().await.is_some(),
 4464         -
            "we expected operation handler to be invoked but it was not entered"
 4465         -
        );
 4466         -
    }
 4467         -
 4468   4319   
    /// Serializes simple scalar properties
 4469   4320   
    /// Test ID: RpcV2CborSimpleScalarProperties
 4470   4321   
    #[::tokio::test]
 4471   4322   
    #[::tracing_test::traced_test]
 4472   4323   
    async fn rpc_v2_cbor_simple_scalar_properties_response() {
 4473   4324   
        let output = crate::output::SimpleScalarPropertiesOutput {
 4474   4325   
            true_boolean_value: ::std::option::Option::Some(true),
 4475   4326   
            false_boolean_value: ::std::option::Option::Some(false),
 4476   4327   
            byte_value: ::std::option::Option::Some(5),
 4477   4328   
            double_value: ::std::option::Option::Some(1.889_f64),
@@ -4760,4611 +4820,4670 @@
 4780   4631   
 4781   4632   
    /// When input is empty we write CBOR equivalent of {}
 4782   4633   
    /// Test ID: optional_input
 4783   4634   
    #[::tokio::test]
 4784   4635   
    #[::tracing_test::traced_test]
 4785   4636   
    async fn optional_input_request() {
 4786   4637   
        #[allow(unused_mut)]
 4787   4638   
        let mut http_request = http::Request::builder()
 4788   4639   
            .uri("/service/RpcV2Protocol/operation/OptionalInputOutput")
 4789   4640   
            .method("POST")
 4790         -
            .header("Accept", "application/cbor")
 4791   4641   
            .header("Content-Type", "application/cbor")
 4792   4642   
            .header("smithy-protocol", "rpc-v2-cbor")
 4793   4643   
            .body(::aws_smithy_http_server::body::Body::from(
 4794   4644   
                ::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
 4795   4645   
                    "v/8=".as_bytes(),
 4796   4646   
                    ::aws_smithy_protocol_test::MediaType::from("application/cbor"),
 4797   4647   
                )),
 4798   4648   
            ))
 4799   4649   
            .unwrap();
 4800   4650   
        #[allow(unused_mut)]
@@ -4939,4789 +5046,4894 @@
 4959   4809   
 4960   4810   
    /// When Input structure is empty we write CBOR equivalent of {}
 4961   4811   
    /// Test ID: empty_input
 4962   4812   
    #[::tokio::test]
 4963   4813   
    #[::tracing_test::traced_test]
 4964   4814   
    async fn empty_input_request() {
 4965   4815   
        #[allow(unused_mut)]
 4966   4816   
        let mut http_request = http::Request::builder()
 4967   4817   
            .uri("/service/RpcV2Protocol/operation/EmptyInputOutput")
 4968   4818   
            .method("POST")
 4969         -
            .header("Accept", "application/cbor")
 4970   4819   
            .header("Content-Type", "application/cbor")
 4971   4820   
            .header("smithy-protocol", "rpc-v2-cbor")
 4972   4821   
            .body(::aws_smithy_http_server::body::Body::from(
 4973   4822   
                ::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
 4974   4823   
                    "v/8=".as_bytes(),
 4975   4824   
                    ::aws_smithy_protocol_test::MediaType::from("application/cbor"),
 4976   4825   
                )),
 4977   4826   
            ))
 4978   4827   
            .unwrap();
 4979   4828   
        #[allow(unused_mut)]
 4980   4829   
        let (sender, mut receiver) = ::tokio::sync::mpsc::channel(1);
 4981   4830   
        let config = crate::service::RpcV2ProtocolConfig::builder().build();
 4982   4831   
        let service =
 4983   4832   
            crate::service::RpcV2Protocol::builder::<::hyper::body::Body, _, _, _>(config)
 4984   4833   
                .empty_input_output(move |input: crate::input::EmptyInputOutputInput| {
 4985   4834   
                    let sender = sender.clone();
 4986   4835   
                    async move {
 4987   4836   
                        let result = {
 4988   4837   
                            let expected = crate::input::EmptyInputOutputInput {};
 4989   4838   
                            ::pretty_assertions::assert_eq!(input, expected);
 4990   4839   
                            let output = crate::output::EmptyInputOutputOutput {};
 4991   4840   
                            output
 4992   4841   
                        };
 4993   4842   
                        sender.send(()).await.expect("receiver dropped early");
 4994   4843   
                        result
 4995   4844   
                    }
 4996   4845   
                })
 4997   4846   
                .build_unchecked();
 4998   4847   
        let http_response = ::tower::ServiceExt::oneshot(service, http_request)
 4999   4848   
            .await
 5000   4849   
            .expect("unable to make an HTTP request");
 5001   4850   
        assert!(
 5002   4851   
            receiver.recv().await.is_some(),
 5003   4852   
            "we expected operation handler to be invoked but it was not entered"
 5004   4853   
        );
 5005   4854   
    }
 5006   4855   
 5007   4856   
    /// When Input structure is empty the server should accept an empty body
 5008   4857   
    /// Test ID: empty_input_no_body
 5009   4858   
    #[::tokio::test]
 5010   4859   
    #[::tracing_test::traced_test]
 5011   4860   
    async fn empty_input_no_body_request() {
 5012   4861   
        #[allow(unused_mut)]
 5013   4862   
        let mut http_request = http::Request::builder()
 5014   4863   
            .uri("/service/RpcV2Protocol/operation/EmptyInputOutput")
 5015   4864   
            .method("POST")
 5016         -
            .header("Accept", "application/cbor")
 5017   4865   
            .header("Content-Type", "application/cbor")
 5018   4866   
            .header("smithy-protocol", "rpc-v2-cbor")
 5019   4867   
            .body(::aws_smithy_http_server::body::Body::from(
 5020   4868   
                ::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
 5021   4869   
                    "".as_bytes(),
 5022   4870   
                    ::aws_smithy_protocol_test::MediaType::from("application/cbor"),
 5023   4871   
                )),
 5024   4872   
            ))
 5025   4873   
            .unwrap();
 5026   4874   
        #[allow(unused_mut)]
@@ -5192,5040 +5252,5099 @@
 5212   5060   
 5213   5061   
    /// Body is empty and no Content-Type header if no input
 5214   5062   
    /// Test ID: no_input
 5215   5063   
    #[::tokio::test]
 5216   5064   
    #[::tracing_test::traced_test]
 5217   5065   
    async fn no_input_request() {
 5218   5066   
        #[allow(unused_mut)]
 5219   5067   
        let mut http_request = http::Request::builder()
 5220   5068   
            .uri("/service/RpcV2Protocol/operation/NoInputOutput")
 5221   5069   
            .method("POST")
 5222         -
            .header("Accept", "application/cbor")
 5223   5070   
            .header("smithy-protocol", "rpc-v2-cbor")
 5224   5071   
            .body(::aws_smithy_http_server::body::Body::from(
 5225   5072   
                ::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
 5226   5073   
                    "".as_bytes(),
 5227   5074   
                    ::aws_smithy_protocol_test::MediaType::from("unknown"),
 5228   5075   
                )),
 5229   5076   
            ))
 5230   5077   
            .unwrap();
 5231   5078   
        #[allow(unused_mut)]
 5232   5079   
        let (sender, mut receiver) = ::tokio::sync::mpsc::channel(1);