Server Test

Server Test

rev. 960037ddd6baa855c43528258ed60c279b45ae58

Files changed:

tmp-codegen-diff/codegen-server-test/rest_json/rust-server-codegen/src/protocol_serde/shape_http_request_with_labels_and_timestamp_format.rs

@@ -54,54 +133,133 @@
   74     74   
                ::nom::sequence::preceded(
   75     75   
                    ::nom::bytes::complete::tag("/"),
   76     76   
                    ::nom::branch::alt::<_, _, ::nom::error::Error<&str>, _>((
   77     77   
                        ::nom::bytes::complete::take_until("/"),
   78     78   
                        ::nom::combinator::rest,
   79     79   
                    )),
   80     80   
                ),
   81     81   
            ))(input_string)?;
   82     82   
        debug_assert_eq!("", input_string);
   83     83   
        input = input.set_member_epoch_seconds(
   84         -
                                        crate::protocol_serde::shape_http_request_with_labels_and_timestamp_format_input::de_member_epoch_seconds(m1)?
   85         -
                                    );
          84  +
                                    crate::protocol_serde::shape_http_request_with_labels_and_timestamp_format_input::de_member_epoch_seconds(m1)?
          85  +
                                );
   86     86   
        input = input.set_member_http_date(
   87         -
                                        crate::protocol_serde::shape_http_request_with_labels_and_timestamp_format_input::de_member_http_date(m2)?
   88         -
                                    );
          87  +
                                    crate::protocol_serde::shape_http_request_with_labels_and_timestamp_format_input::de_member_http_date(m2)?
          88  +
                                );
   89     89   
        input = input.set_member_date_time(
   90         -
                                        crate::protocol_serde::shape_http_request_with_labels_and_timestamp_format_input::de_member_date_time(m3)?
   91         -
                                    );
          90  +
                                    crate::protocol_serde::shape_http_request_with_labels_and_timestamp_format_input::de_member_date_time(m3)?
          91  +
                                );
   92     92   
        input = input.set_default_format(
   93         -
                                        crate::protocol_serde::shape_http_request_with_labels_and_timestamp_format_input::de_default_format(m4)?
   94         -
                                    );
          93  +
                                    crate::protocol_serde::shape_http_request_with_labels_and_timestamp_format_input::de_default_format(m4)?
          94  +
                                );
   95     95   
        input = input.set_target_epoch_seconds(
   96         -
                                        crate::protocol_serde::shape_http_request_with_labels_and_timestamp_format_input::de_target_epoch_seconds(m5)?
   97         -
                                    );
          96  +
                                    crate::protocol_serde::shape_http_request_with_labels_and_timestamp_format_input::de_target_epoch_seconds(m5)?
          97  +
                                );
   98     98   
        input = input.set_target_http_date(
   99         -
                                        crate::protocol_serde::shape_http_request_with_labels_and_timestamp_format_input::de_target_http_date(m6)?
  100         -
                                    );
          99  +
                                    crate::protocol_serde::shape_http_request_with_labels_and_timestamp_format_input::de_target_http_date(m6)?
         100  +
                                );
  101    101   
        input = input.set_target_date_time(
  102         -
                                        crate::protocol_serde::shape_http_request_with_labels_and_timestamp_format_input::de_target_date_time(m7)?
  103         -
                                    );
         102  +
                                    crate::protocol_serde::shape_http_request_with_labels_and_timestamp_format_input::de_target_date_time(m7)?
         103  +
                                );
  104    104   
        input.build()?
  105    105   
    })
  106    106   
}
  107    107   
  108    108   
#[allow(clippy::unnecessary_wraps)]
  109    109   
pub fn ser_http_request_with_labels_and_timestamp_format_http_response(
  110    110   
    #[allow(unused_variables)] output: crate::output::HttpRequestWithLabelsAndTimestampFormatOutput,
  111    111   
) -> std::result::Result<
  112    112   
    ::aws_smithy_http_server::response::Response,
  113    113   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,

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

@@ -22,22 +82,81 @@
   42     42   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
   43     43   
        let fut = async move {
   44     44   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
   45     45   
                request.headers(),
   46     46   
                &CONTENT_TYPE_QUERYPRECEDENCE,
   47     47   
            ) {
   48     48   
                return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
   49     49   
            }
   50     50   
            crate::protocol_serde::shape_query_precedence::de_query_precedence_http_request(request)
   51     51   
                .await
   52         -
                .map_err(Into::into)
   53     52   
        };
   54     53   
        use ::futures_util::future::TryFutureExt;
   55     54   
        let fut = fut.map_err(
   56     55   
            |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
   57     56   
                ::tracing::debug!(error = %e, "failed to deserialize request");
   58     57   
                ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
   59     58   
                    e,
   60     59   
                )
   61     60   
            },
   62     61   
        );
@@ -213,212 +273,271 @@
  233    232   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
  234    233   
        let fut = async move {
  235    234   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
  236    235   
                request.headers(),
  237    236   
                &CONTENT_TYPE_EMPTYSTRUCTWITHCONTENTONWIREOP,
  238    237   
            ) {
  239    238   
                return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
  240    239   
            }
  241    240   
            crate::protocol_serde::shape_empty_struct_with_content_on_wire_op::de_empty_struct_with_content_on_wire_op_http_request(request)
  242    241   
                            .await
  243         -
                            .map_err(Into::into)
  244    242   
        };
  245    243   
        use ::futures_util::future::TryFutureExt;
  246    244   
        let fut = fut.map_err(
  247    245   
            |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
  248    246   
                ::tracing::debug!(error = %e, "failed to deserialize request");
  249    247   
                ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
  250    248   
                    e,
  251    249   
                )
  252    250   
            },
  253    251   
        );
@@ -346,344 +406,403 @@
  366    364   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
  367    365   
        let fut = async move {
  368    366   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
  369    367   
                request.headers(),
  370    368   
                &CONTENT_TYPE_CASEINSENSITIVEERROROPERATION,
  371    369   
            ) {
  372    370   
                return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
  373    371   
            }
  374    372   
            crate::protocol_serde::shape_case_insensitive_error_operation::de_case_insensitive_error_operation_http_request(request)
  375    373   
                            .await
  376         -
                            .map_err(Into::into)
  377    374   
        };
  378    375   
        use ::futures_util::future::TryFutureExt;
  379    376   
        let fut = fut.map_err(
  380    377   
            |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
  381    378   
                ::tracing::debug!(error = %e, "failed to deserialize request");
  382    379   
                ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
  383    380   
                    e,
  384    381   
                )
  385    382   
            },
  386    383   
        );
@@ -481,478 +541,537 @@
  501    498   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
  502    499   
                request.headers(),
  503    500   
                &CONTENT_TYPE_NULLINNONSPARSE,
  504    501   
            ) {
  505    502   
                return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
  506    503   
            }
  507    504   
            crate::protocol_serde::shape_null_in_non_sparse::de_null_in_non_sparse_http_request(
  508    505   
                request,
  509    506   
            )
  510    507   
            .await
  511         -
            .map_err(Into::into)
  512    508   
        };
  513    509   
        use ::futures_util::future::TryFutureExt;
  514    510   
        let fut = fut.map_err(
  515    511   
            |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
  516    512   
                ::tracing::debug!(error = %e, "failed to deserialize request");
  517    513   
                ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
  518    514   
                    e,
  519    515   
                )
  520    516   
            },
  521    517   
        );
@@ -620,616 +680,675 @@
  640    636   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
  641    637   
        let fut = async move {
  642    638   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
  643    639   
                request.headers(),
  644    640   
                &CONTENT_TYPE_ESCAPEDSTRINGVALUES,
  645    641   
            ) {
  646    642   
                return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
  647    643   
            }
  648    644   
            crate::protocol_serde::shape_escaped_string_values::de_escaped_string_values_http_request(request)
  649    645   
                            .await
  650         -
                            .map_err(Into::into)
  651    646   
        };
  652    647   
        use ::futures_util::future::TryFutureExt;
  653    648   
        let fut = fut.map_err(
  654    649   
            |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
  655    650   
                ::tracing::debug!(error = %e, "failed to deserialize request");
  656    651   
                ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
  657    652   
                    e,
  658    653   
                )
  659    654   
            },
  660    655   
        );
@@ -834,829 +894,888 @@
  854    849   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
  855    850   
        let fut = async move {
  856    851   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
  857    852   
                request.headers(),
  858    853   
                &CONTENT_TYPE_PRIMITIVEINTOP,
  859    854   
            ) {
  860    855   
                return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
  861    856   
            }
  862    857   
            crate::protocol_serde::shape_primitive_int_op::de_primitive_int_op_http_request(request)
  863    858   
                .await
  864         -
                .map_err(Into::into)
  865    859   
        };
  866    860   
        use ::futures_util::future::TryFutureExt;
  867    861   
        let fut = fut.map_err(
  868    862   
            |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
  869    863   
                ::tracing::debug!(error = %e, "failed to deserialize request");
  870    864   
                ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
  871    865   
                    e,
  872    866   
                )
  873    867   
            },
  874    868   
        );
@@ -974,968 +1034,1027 @@
  994    988   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
  995    989   
                request.headers(),
  996    990   
                &CONTENT_TYPE_MAPWITHENUMKEYOP,
  997    991   
            ) {
  998    992   
                return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
  999    993   
            }
 1000    994   
            crate::protocol_serde::shape_map_with_enum_key_op::de_map_with_enum_key_op_http_request(
 1001    995   
                request,
 1002    996   
            )
 1003    997   
            .await
 1004         -
            .map_err(Into::into)
 1005    998   
        };
 1006    999   
        use ::futures_util::future::TryFutureExt;
 1007   1000   
        let fut = fut.map_err(
 1008   1001   
            |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
 1009   1002   
                ::tracing::debug!(error = %e, "failed to deserialize request");
 1010   1003   
                ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
 1011   1004   
                    e,
 1012   1005   
                )
 1013   1006   
            },
 1014   1007   
        );
@@ -1199,1192 +1259,1251 @@
 1219   1212   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
 1220   1213   
        let fut = async move {
 1221   1214   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
 1222   1215   
                request.headers(),
 1223   1216   
                &CONTENT_TYPE_STATUSRESPONSE,
 1224   1217   
            ) {
 1225   1218   
                return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
 1226   1219   
            }
 1227   1220   
            crate::protocol_serde::shape_status_response::de_status_response_http_request(request)
 1228   1221   
                .await
 1229         -
                .map_err(Into::into)
 1230   1222   
        };
 1231   1223   
        use ::futures_util::future::TryFutureExt;
 1232   1224   
        let fut = fut.map_err(
 1233   1225   
            |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
 1234   1226   
                ::tracing::debug!(error = %e, "failed to deserialize request");
 1235   1227   
                ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
 1236   1228   
                    e,
 1237   1229   
                )
 1238   1230   
            },
 1239   1231   
        );
@@ -1333,1325 +1395,1385 @@
 1353   1345   
    type Future = EnumQueryInputFuture;
 1354   1346   
 1355   1347   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
 1356   1348   
        let fut = async move {
 1357   1349   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
 1358   1350   
                request.headers(),
 1359   1351   
                &CONTENT_TYPE_ENUMQUERY,
 1360   1352   
            ) {
 1361   1353   
                return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
 1362   1354   
            }
 1363         -
            crate::protocol_serde::shape_enum_query::de_enum_query_http_request(request)
 1364         -
                .await
 1365         -
                .map_err(Into::into)
        1355  +
            crate::protocol_serde::shape_enum_query::de_enum_query_http_request(request).await
 1366   1356   
        };
 1367   1357   
        use ::futures_util::future::TryFutureExt;
 1368   1358   
        let fut = fut.map_err(
 1369   1359   
            |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
 1370   1360   
                ::tracing::debug!(error = %e, "failed to deserialize request");
 1371   1361   
                ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
 1372   1362   
                    e,
 1373   1363   
                )
 1374   1364   
            },
 1375   1365   
        );
@@ -1514,1504 +1574,1563 @@
 1534   1524   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
 1535   1525   
                request.headers(),
 1536   1526   
                &CONTENT_TYPE_PRIMITIVEINTHEADER,
 1537   1527   
            ) {
 1538   1528   
                return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
 1539   1529   
            }
 1540   1530   
            crate::protocol_serde::shape_primitive_int_header::de_primitive_int_header_http_request(
 1541   1531   
                request,
 1542   1532   
            )
 1543   1533   
            .await
 1544         -
            .map_err(Into::into)
 1545   1534   
        };
 1546   1535   
        use ::futures_util::future::TryFutureExt;
 1547   1536   
        let fut = fut.map_err(
 1548   1537   
            |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
 1549   1538   
                ::tracing::debug!(error = %e, "failed to deserialize request");
 1550   1539   
                ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
 1551   1540   
                    e,
 1552   1541   
                )
 1553   1542   
            },
 1554   1543   
        );
@@ -1686,1675 +1746,1734 @@
 1706   1695   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
 1707   1696   
        let fut = async move {
 1708   1697   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
 1709   1698   
                request.headers(),
 1710   1699   
                &CONTENT_TYPE_STRINGPAYLOAD,
 1711   1700   
            ) {
 1712   1701   
                return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
 1713   1702   
            }
 1714   1703   
            crate::protocol_serde::shape_string_payload::de_string_payload_http_request(request)
 1715   1704   
                .await
 1716         -
                .map_err(Into::into)
 1717   1705   
        };
 1718   1706   
        use ::futures_util::future::TryFutureExt;
 1719   1707   
        let fut = fut.map_err(
 1720   1708   
            |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
 1721   1709   
                ::tracing::debug!(error = %e, "failed to deserialize request");
 1722   1710   
                ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
 1723   1711   
                    e,
 1724   1712   
                )
 1725   1713   
            },
 1726   1714   
        );

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

@@ -24,24 +84,83 @@
   44     44   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
   45     45   
                request.headers(),
   46     46   
                &CONTENT_TYPE_SENSITIVEVALIDATION,
   47     47   
            ) {
   48     48   
                return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
   49     49   
            }
   50     50   
            crate::protocol_serde::shape_sensitive_validation::de_sensitive_validation_http_request(
   51     51   
                request,
   52     52   
            )
   53     53   
            .await
   54         -
            .map_err(Into::into)
   55     54   
        };
   56     55   
        use ::futures_util::future::TryFutureExt;
   57     56   
        let fut = fut.map_err(
   58     57   
            |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
   59     58   
                ::tracing::debug!(error = %e, "failed to deserialize request");
   60     59   
                ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
   61     60   
                    e,
   62     61   
                )
   63     62   
            },
   64     63   
        );
@@ -188,187 +248,246 @@
  208    207   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
  209    208   
                request.headers(),
  210    209   
                &CONTENT_TYPE_RECURSIVESTRUCTURES,
  211    210   
            ) {
  212    211   
                return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
  213    212   
            }
  214    213   
            crate::protocol_serde::shape_recursive_structures::de_recursive_structures_http_request(
  215    214   
                request,
  216    215   
            )
  217    216   
            .await
  218         -
            .map_err(Into::into)
  219    217   
        };
  220    218   
        use ::futures_util::future::TryFutureExt;
  221    219   
        let fut = fut.map_err(
  222    220   
            |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
  223    221   
                ::tracing::debug!(error = %e, "failed to deserialize request");
  224    222   
                ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
  225    223   
                    e,
  226    224   
                )
  227    225   
            },
  228    226   
        );
@@ -403,401 +463,460 @@
  423    421   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
  424    422   
        let fut = async move {
  425    423   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
  426    424   
                request.headers(),
  427    425   
                &CONTENT_TYPE_MALFORMEDUNIQUEITEMS,
  428    426   
            ) {
  429    427   
                return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
  430    428   
            }
  431    429   
            crate::protocol_serde::shape_malformed_unique_items::de_malformed_unique_items_http_request(request)
  432    430   
                            .await
  433         -
                            .map_err(Into::into)
  434    431   
        };
  435    432   
        use ::futures_util::future::TryFutureExt;
  436    433   
        let fut = fut.map_err(
  437    434   
            |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
  438    435   
                ::tracing::debug!(error = %e, "failed to deserialize request");
  439    436   
                ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
  440    437   
                    e,
  441    438   
                )
  442    439   
            },
  443    440   
        );
@@ -1480,1477 +1540,1536 @@
 1500   1497   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
 1501   1498   
                request.headers(),
 1502   1499   
                &CONTENT_TYPE_MALFORMEDREQUIRED,
 1503   1500   
            ) {
 1504   1501   
                return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
 1505   1502   
            }
 1506   1503   
            crate::protocol_serde::shape_malformed_required::de_malformed_required_http_request(
 1507   1504   
                request,
 1508   1505   
            )
 1509   1506   
            .await
 1510         -
            .map_err(Into::into)
 1511   1507   
        };
 1512   1508   
        use ::futures_util::future::TryFutureExt;
 1513   1509   
        let fut = fut.map_err(
 1514   1510   
            |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
 1515   1511   
                ::tracing::debug!(error = %e, "failed to deserialize request");
 1516   1512   
                ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
 1517   1513   
                    e,
 1518   1514   
                )
 1519   1515   
            },
 1520   1516   
        );
@@ -1755,1751 +1815,1810 @@
 1775   1771   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
 1776   1772   
        let fut = async move {
 1777   1773   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
 1778   1774   
                request.headers(),
 1779   1775   
                &CONTENT_TYPE_MALFORMEDRANGEOVERRIDE,
 1780   1776   
            ) {
 1781   1777   
                return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
 1782   1778   
            }
 1783   1779   
            crate::protocol_serde::shape_malformed_range_override::de_malformed_range_override_http_request(request)
 1784   1780   
                            .await
 1785         -
                            .map_err(Into::into)
 1786   1781   
        };
 1787   1782   
        use ::futures_util::future::TryFutureExt;
 1788   1783   
        let fut = fut.map_err(
 1789   1784   
            |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
 1790   1785   
                ::tracing::debug!(error = %e, "failed to deserialize request");
 1791   1786   
                ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
 1792   1787   
                    e,
 1793   1788   
                )
 1794   1789   
            },
 1795   1790   
        );
@@ -2924,2919 +2984,2978 @@
 2944   2939   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
 2945   2940   
        let fut = async move {
 2946   2941   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
 2947   2942   
                request.headers(),
 2948   2943   
                &CONTENT_TYPE_MALFORMEDRANGE,
 2949   2944   
            ) {
 2950   2945   
                return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
 2951   2946   
            }
 2952   2947   
            crate::protocol_serde::shape_malformed_range::de_malformed_range_http_request(request)
 2953   2948   
                .await
 2954         -
                .map_err(Into::into)
 2955   2949   
        };
 2956   2950   
        use ::futures_util::future::TryFutureExt;
 2957   2951   
        let fut = fut.map_err(
 2958   2952   
            |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
 2959   2953   
                ::tracing::debug!(error = %e, "failed to deserialize request");
 2960   2954   
                ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
 2961   2955   
                    e,
 2962   2956   
                )
 2963   2957   
            },
 2964   2958   
        );
@@ -4096,4090 +4156,4149 @@
 4116   4110   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
 4117   4111   
        let fut = async move {
 4118   4112   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
 4119   4113   
                request.headers(),
 4120   4114   
                &CONTENT_TYPE_MALFORMEDPATTERNOVERRIDE,
 4121   4115   
            ) {
 4122   4116   
                return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
 4123   4117   
            }
 4124   4118   
            crate::protocol_serde::shape_malformed_pattern_override::de_malformed_pattern_override_http_request(request)
 4125   4119   
                            .await
 4126         -
                            .map_err(Into::into)
 4127   4120   
        };
 4128   4121   
        use ::futures_util::future::TryFutureExt;
 4129   4122   
        let fut = fut.map_err(
 4130   4123   
            |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
 4131   4124   
                ::tracing::debug!(error = %e, "failed to deserialize request");
 4132   4125   
                ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
 4133   4126   
                    e,
 4134   4127   
                )
 4135   4128   
            },
 4136   4129   
        );
@@ -4733,4726 +4793,4785 @@
 4753   4746   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
 4754   4747   
                request.headers(),
 4755   4748   
                &CONTENT_TYPE_MALFORMEDPATTERN,
 4756   4749   
            ) {
 4757   4750   
                return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
 4758   4751   
            }
 4759   4752   
            crate::protocol_serde::shape_malformed_pattern::de_malformed_pattern_http_request(
 4760   4753   
                request,
 4761   4754   
            )
 4762   4755   
            .await
 4763         -
            .map_err(Into::into)
 4764   4756   
        };
 4765   4757   
        use ::futures_util::future::TryFutureExt;
 4766   4758   
        let fut = fut.map_err(
 4767   4759   
            |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
 4768   4760   
                ::tracing::debug!(error = %e, "failed to deserialize request");
 4769   4761   
                ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
 4770   4762   
                    e,
 4771   4763   
                )
 4772   4764   
            },
 4773   4765   
        );
@@ -5477,5469 +5537,5528 @@
 5497   5489   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
 5498   5490   
        let fut = async move {
 5499   5491   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
 5500   5492   
                request.headers(),
 5501   5493   
                &CONTENT_TYPE_MALFORMEDLENGTHQUERYSTRING,
 5502   5494   
            ) {
 5503   5495   
                return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
 5504   5496   
            }
 5505   5497   
            crate::protocol_serde::shape_malformed_length_query_string::de_malformed_length_query_string_http_request(request)
 5506   5498   
                            .await
 5507         -
                            .map_err(Into::into)
 5508   5499   
        };
 5509   5500   
        use ::futures_util::future::TryFutureExt;
 5510   5501   
        let fut = fut.map_err(
 5511   5502   
            |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
 5512   5503   
                ::tracing::debug!(error = %e, "failed to deserialize request");
 5513   5504   
                ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
 5514   5505   
                    e,
 5515   5506   
                )
 5516   5507   
            },
 5517   5508   
        );
@@ -5636,5627 +5696,5686 @@
 5656   5647   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
 5657   5648   
        let fut = async move {
 5658   5649   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
 5659   5650   
                request.headers(),
 5660   5651   
                &CONTENT_TYPE_MALFORMEDLENGTHOVERRIDE,
 5661   5652   
            ) {
 5662   5653   
                return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
 5663   5654   
            }
 5664   5655   
            crate::protocol_serde::shape_malformed_length_override::de_malformed_length_override_http_request(request)
 5665   5656   
                            .await
 5666         -
                            .map_err(Into::into)
 5667   5657   
        };
 5668   5658   
        use ::futures_util::future::TryFutureExt;
 5669   5659   
        let fut = fut.map_err(
 5670   5660   
            |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
 5671   5661   
                ::tracing::debug!(error = %e, "failed to deserialize request");
 5672   5662   
                ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
 5673   5663   
                    e,
 5674   5664   
                )
 5675   5665   
            },
 5676   5666   
        );
@@ -6318,6308 +6378,6367 @@
 6338   6328   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
 6339   6329   
        let fut = async move {
 6340   6330   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
 6341   6331   
                request.headers(),
 6342   6332   
                &CONTENT_TYPE_MALFORMEDLENGTH,
 6343   6333   
            ) {
 6344   6334   
                return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
 6345   6335   
            }
 6346   6336   
            crate::protocol_serde::shape_malformed_length::de_malformed_length_http_request(request)
 6347   6337   
                .await
 6348         -
                .map_err(Into::into)
 6349   6338   
        };
 6350   6339   
        use ::futures_util::future::TryFutureExt;
 6351   6340   
        let fut = fut.map_err(
 6352   6341   
            |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
 6353   6342   
                ::tracing::debug!(error = %e, "failed to deserialize request");
 6354   6343   
                ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
 6355   6344   
                    e,
 6356   6345   
                )
 6357   6346   
            },
 6358   6347   
        );
@@ -7317,7306 +7377,7365 @@
 7337   7326   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
 7338   7327   
        let fut = async move {
 7339   7328   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
 7340   7329   
                request.headers(),
 7341   7330   
                &CONTENT_TYPE_MALFORMEDENUM,
 7342   7331   
            ) {
 7343   7332   
                return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
 7344   7333   
            }
 7345   7334   
            crate::protocol_serde::shape_malformed_enum::de_malformed_enum_http_request(request)
 7346   7335   
                .await
 7347         -
                .map_err(Into::into)
 7348   7336   
        };
 7349   7337   
        use ::futures_util::future::TryFutureExt;
 7350   7338   
        let fut = fut.map_err(
 7351   7339   
            |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
 7352   7340   
                ::tracing::debug!(error = %e, "failed to deserialize request");
 7353   7341   
                ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
 7354   7342   
                    e,
 7355   7343   
                )
 7356   7344   
            },
 7357   7345   
        );

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

@@ -24,24 +86,84 @@
   44     44   
    type Future = Float16InputFuture;
   45     45   
   46     46   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
   47     47   
        let fut = async move {
   48     48   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
   49     49   
                request.headers(),
   50     50   
                &CONTENT_TYPE_FLOAT16,
   51     51   
            ) {
   52     52   
                return Err(::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection::NotAcceptable);
   53     53   
            }
   54         -
            crate::protocol_serde::shape_float16::de_float16_http_request(request)
   55         -
                .await
   56         -
                .map_err(Into::into)
          54  +
            crate::protocol_serde::shape_float16::de_float16_http_request(request).await
   57     55   
        };
   58     56   
        use ::futures_util::future::TryFutureExt;
   59     57   
        let fut = fut.map_err(
   60     58   
            |e: ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection| {
   61     59   
                ::tracing::debug!(error = %e, "failed to deserialize request");
   62     60   
                ::aws_smithy_http_server::protocol::rpc_v2_cbor::runtime_error::RuntimeError::from(
   63     61   
                    e,
   64     62   
                )
   65     63   
            },
   66     64   
        );
@@ -113,111 +173,170 @@
  133    131   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
  134    132   
        let fut = async move {
  135    133   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
  136    134   
                request.headers(),
  137    135   
                &CONTENT_TYPE_SPARSENULLSOPERATION,
  138    136   
            ) {
  139    137   
                return Err(::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection::NotAcceptable);
  140    138   
            }
  141    139   
            crate::protocol_serde::shape_sparse_nulls_operation::de_sparse_nulls_operation_http_request(request)
  142    140   
                            .await
  143         -
                            .map_err(Into::into)
  144    141   
        };
  145    142   
        use ::futures_util::future::TryFutureExt;
  146    143   
        let fut = fut.map_err(
  147    144   
            |e: ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection| {
  148    145   
                ::tracing::debug!(error = %e, "failed to deserialize request");
  149    146   
                ::aws_smithy_http_server::protocol::rpc_v2_cbor::runtime_error::RuntimeError::from(
  150    147   
                    e,
  151    148   
                )
  152    149   
            },
  153    150   
        );
@@ -387,384 +447,443 @@
  407    404   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
  408    405   
        let fut = async move {
  409    406   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
  410    407   
                request.headers(),
  411    408   
                &CONTENT_TYPE_OPERATIONWITHDEFAULTS,
  412    409   
            ) {
  413    410   
                return Err(::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection::NotAcceptable);
  414    411   
            }
  415    412   
            crate::protocol_serde::shape_operation_with_defaults::de_operation_with_defaults_http_request(request)
  416    413   
                            .await
  417         -
                            .map_err(Into::into)
  418    414   
        };
  419    415   
        use ::futures_util::future::TryFutureExt;
  420    416   
        let fut = fut.map_err(
  421    417   
            |e: ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection| {
  422    418   
                ::tracing::debug!(error = %e, "failed to deserialize request");
  423    419   
                ::aws_smithy_http_server::protocol::rpc_v2_cbor::runtime_error::RuntimeError::from(
  424    420   
                    e,
  425    421   
                )
  426    422   
            },
  427    423   
        );
@@ -664,660 +724,719 @@
  684    680   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
  685    681   
                request.headers(),
  686    682   
                &CONTENT_TYPE_FRACTIONALSECONDS,
  687    683   
            ) {
  688    684   
                return Err(::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection::NotAcceptable);
  689    685   
            }
  690    686   
            crate::protocol_serde::shape_fractional_seconds::de_fractional_seconds_http_request(
  691    687   
                request,
  692    688   
            )
  693    689   
            .await
  694         -
            .map_err(Into::into)
  695    690   
        };
  696    691   
        use ::futures_util::future::TryFutureExt;
  697    692   
        let fut = fut.map_err(
  698    693   
            |e: ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection| {
  699    694   
                ::tracing::debug!(error = %e, "failed to deserialize request");
  700    695   
                ::aws_smithy_http_server::protocol::rpc_v2_cbor::runtime_error::RuntimeError::from(
  701    696   
                    e,
  702    697   
                )
  703    698   
            },
  704    699   
        );
@@ -755,750 +815,809 @@
  775    770   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
  776    771   
                request.headers(),
  777    772   
                &CONTENT_TYPE_GREETINGWITHERRORS,
  778    773   
            ) {
  779    774   
                return Err(::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection::NotAcceptable);
  780    775   
            }
  781    776   
            crate::protocol_serde::shape_greeting_with_errors::de_greeting_with_errors_http_request(
  782    777   
                request,
  783    778   
            )
  784    779   
            .await
  785         -
            .map_err(Into::into)
  786    780   
        };
  787    781   
        use ::futures_util::future::TryFutureExt;
  788    782   
        let fut = fut.map_err(
  789    783   
            |e: ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection| {
  790    784   
                ::tracing::debug!(error = %e, "failed to deserialize request");
  791    785   
                ::aws_smithy_http_server::protocol::rpc_v2_cbor::runtime_error::RuntimeError::from(
  792    786   
                    e,
  793    787   
                )
  794    788   
            },
  795    789   
        );
@@ -966,960 +1026,1019 @@
  986    980   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
  987    981   
        let fut = async move {
  988    982   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
  989    983   
                request.headers(),
  990    984   
                &CONTENT_TYPE_RECURSIVESHAPES,
  991    985   
            ) {
  992    986   
                return Err(::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection::NotAcceptable);
  993    987   
            }
  994    988   
            crate::protocol_serde::shape_recursive_shapes::de_recursive_shapes_http_request(request)
  995    989   
                .await
  996         -
                .map_err(Into::into)
  997    990   
        };
  998    991   
        use ::futures_util::future::TryFutureExt;
  999    992   
        let fut = fut.map_err(
 1000    993   
            |e: ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection| {
 1001    994   
                ::tracing::debug!(error = %e, "failed to deserialize request");
 1002    995   
                ::aws_smithy_http_server::protocol::rpc_v2_cbor::runtime_error::RuntimeError::from(
 1003    996   
                    e,
 1004    997   
                )
 1005    998   
            },
 1006    999   
        );
@@ -1210,1203 +1270,1262 @@
 1230   1223   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
 1231   1224   
        let fut = async move {
 1232   1225   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
 1233   1226   
                request.headers(),
 1234   1227   
                &CONTENT_TYPE_RPCV2CBORSPARSEMAPS,
 1235   1228   
            ) {
 1236   1229   
                return Err(::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection::NotAcceptable);
 1237   1230   
            }
 1238   1231   
            crate::protocol_serde::shape_rpc_v2_cbor_sparse_maps::de_rpc_v2_cbor_sparse_maps_http_request(request)
 1239   1232   
                            .await
 1240         -
                            .map_err(Into::into)
 1241   1233   
        };
 1242   1234   
        use ::futures_util::future::TryFutureExt;
 1243   1235   
        let fut = fut.map_err(
 1244   1236   
            |e: ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection| {
 1245   1237   
                ::tracing::debug!(error = %e, "failed to deserialize request");
 1246   1238   
                ::aws_smithy_http_server::protocol::rpc_v2_cbor::runtime_error::RuntimeError::from(
 1247   1239   
                    e,
 1248   1240   
                )
 1249   1241   
            },
 1250   1242   
        );
@@ -1939,1931 +1999,1990 @@
 1959   1951   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
 1960   1952   
        let fut = async move {
 1961   1953   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
 1962   1954   
                request.headers(),
 1963   1955   
                &CONTENT_TYPE_RPCV2CBORDENSEMAPS,
 1964   1956   
            ) {
 1965   1957   
                return Err(::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection::NotAcceptable);
 1966   1958   
            }
 1967   1959   
            crate::protocol_serde::shape_rpc_v2_cbor_dense_maps::de_rpc_v2_cbor_dense_maps_http_request(request)
 1968   1960   
                            .await
 1969         -
                            .map_err(Into::into)
 1970   1961   
        };
 1971   1962   
        use ::futures_util::future::TryFutureExt;
 1972   1963   
        let fut = fut.map_err(
 1973   1964   
            |e: ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection| {
 1974   1965   
                ::tracing::debug!(error = %e, "failed to deserialize request");
 1975   1966   
                ::aws_smithy_http_server::protocol::rpc_v2_cbor::runtime_error::RuntimeError::from(
 1976   1967   
                    e,
 1977   1968   
                )
 1978   1969   
            },
 1979   1970   
        );
@@ -2408,2399 +2468,2458 @@
 2428   2419   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
 2429   2420   
                request.headers(),
 2430   2421   
                &CONTENT_TYPE_RPCV2CBORLISTS,
 2431   2422   
            ) {
 2432   2423   
                return Err(::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection::NotAcceptable);
 2433   2424   
            }
 2434   2425   
            crate::protocol_serde::shape_rpc_v2_cbor_lists::de_rpc_v2_cbor_lists_http_request(
 2435   2426   
                request,
 2436   2427   
            )
 2437   2428   
            .await
 2438         -
            .map_err(Into::into)
 2439   2429   
        };
 2440   2430   
        use ::futures_util::future::TryFutureExt;
 2441   2431   
        let fut = fut.map_err(
 2442   2432   
            |e: ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection| {
 2443   2433   
                ::tracing::debug!(error = %e, "failed to deserialize request");
 2444   2434   
                ::aws_smithy_http_server::protocol::rpc_v2_cbor::runtime_error::RuntimeError::from(
 2445   2435   
                    e,
 2446   2436   
                )
 2447   2437   
            },
 2448   2438   
        );
@@ -3018,3008 +3078,3067 @@
 3038   3028   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
 3039   3029   
        let fut = async move {
 3040   3030   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
 3041   3031   
                request.headers(),
 3042   3032   
                &CONTENT_TYPE_SIMPLESCALARPROPERTIES,
 3043   3033   
            ) {
 3044   3034   
                return Err(::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection::NotAcceptable);
 3045   3035   
            }
 3046   3036   
            crate::protocol_serde::shape_simple_scalar_properties::de_simple_scalar_properties_http_request(request)
 3047   3037   
                            .await
 3048         -
                            .map_err(Into::into)
 3049   3038   
        };
 3050   3039   
        use ::futures_util::future::TryFutureExt;
 3051   3040   
        let fut = fut.map_err(
 3052   3041   
            |e: ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection| {
 3053   3042   
                ::tracing::debug!(error = %e, "failed to deserialize request");
 3054   3043   
                ::aws_smithy_http_server::protocol::rpc_v2_cbor::runtime_error::RuntimeError::from(
 3055   3044   
                    e,
 3056   3045   
                )
 3057   3046   
            },
 3058   3047   
        );
@@ -4714,4703 +4774,4762 @@
 4734   4723   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
 4735   4724   
        let fut = async move {
 4736   4725   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
 4737   4726   
                request.headers(),
 4738   4727   
                &CONTENT_TYPE_OPTIONALINPUTOUTPUT,
 4739   4728   
            ) {
 4740   4729   
                return Err(::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection::NotAcceptable);
 4741   4730   
            }
 4742   4731   
            crate::protocol_serde::shape_optional_input_output::de_optional_input_output_http_request(request)
 4743   4732   
                            .await
 4744         -
                            .map_err(Into::into)
 4745   4733   
        };
 4746   4734   
        use ::futures_util::future::TryFutureExt;
 4747   4735   
        let fut = fut.map_err(
 4748   4736   
            |e: ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection| {
 4749   4737   
                ::tracing::debug!(error = %e, "failed to deserialize request");
 4750   4738   
                ::aws_smithy_http_server::protocol::rpc_v2_cbor::runtime_error::RuntimeError::from(
 4751   4739   
                    e,
 4752   4740   
                )
 4753   4741   
            },
 4754   4742   
        );
@@ -4891,4879 +4951,4938 @@
 4911   4899   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
 4912   4900   
                request.headers(),
 4913   4901   
                &CONTENT_TYPE_EMPTYINPUTOUTPUT,
 4914   4902   
            ) {
 4915   4903   
                return Err(::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection::NotAcceptable);
 4916   4904   
            }
 4917   4905   
            crate::protocol_serde::shape_empty_input_output::de_empty_input_output_http_request(
 4918   4906   
                request,
 4919   4907   
            )
 4920   4908   
            .await
 4921         -
            .map_err(Into::into)
 4922   4909   
        };
 4923   4910   
        use ::futures_util::future::TryFutureExt;
 4924   4911   
        let fut = fut.map_err(
 4925   4912   
            |e: ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection| {
 4926   4913   
                ::tracing::debug!(error = %e, "failed to deserialize request");
 4927   4914   
                ::aws_smithy_http_server::protocol::rpc_v2_cbor::runtime_error::RuntimeError::from(
 4928   4915   
                    e,
 4929   4916   
                )
 4930   4917   
            },
 4931   4918   
        );
@@ -5145,5132 +5205,5191 @@
 5165   5152   
    ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection:
 5166   5153   
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
 5167   5154   
{
 5168   5155   
    type Rejection = ::aws_smithy_http_server::protocol::rpc_v2_cbor::runtime_error::RuntimeError;
 5169   5156   
    type Future = NoInputOutputInputFuture;
 5170   5157   
 5171   5158   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
 5172   5159   
        let fut = async move {
 5173   5160   
            crate::protocol_serde::shape_no_input_output::de_no_input_output_http_request(request)
 5174   5161   
                .await
 5175         -
                .map_err(Into::into)
 5176   5162   
        };
 5177   5163   
        use ::futures_util::future::TryFutureExt;
 5178   5164   
        let fut = fut.map_err(
 5179   5165   
            |e: ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection| {
 5180   5166   
                ::tracing::debug!(error = %e, "failed to deserialize request");
 5181   5167   
                ::aws_smithy_http_server::protocol::rpc_v2_cbor::runtime_error::RuntimeError::from(
 5182   5168   
                    e,
 5183   5169   
                )
 5184   5170   
            },
 5185   5171   
        );

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

@@ -27,27 +87,86 @@
   47     47   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
   48     48   
        let fut = async move {
   49     49   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
   50     50   
                request.headers(),
   51     51   
                &CONTENT_TYPE_RECURSIVEUNIONOPERATION,
   52     52   
            ) {
   53     53   
                return Err(::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection::NotAcceptable);
   54     54   
            }
   55     55   
            crate::protocol_serde::shape_recursive_union_operation::de_recursive_union_operation_http_request(request)
   56     56   
                            .await
   57         -
                            .map_err(Into::into)
   58     57   
        };
   59     58   
        use ::futures_util::future::TryFutureExt;
   60     59   
        let fut = fut.map_err(
   61     60   
            |e: ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection| {
   62     61   
                ::tracing::debug!(error = %e, "failed to deserialize request");
   63     62   
                ::aws_smithy_http_server::protocol::rpc_v2_cbor::runtime_error::RuntimeError::from(
   64     63   
                    e,
   65     64   
                )
   66     65   
            },
   67     66   
        );
@@ -262,261 +322,320 @@
  282    281   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
  283    282   
        let fut = async move {
  284    283   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
  285    284   
                request.headers(),
  286    285   
                &CONTENT_TYPE_SINGLEMEMBERSTRUCTOPERATION,
  287    286   
            ) {
  288    287   
                return Err(::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection::NotAcceptable);
  289    288   
            }
  290    289   
            crate::protocol_serde::shape_single_member_struct_operation::de_single_member_struct_operation_http_request(request)
  291    290   
                            .await
  292         -
                            .map_err(Into::into)
  293    291   
        };
  294    292   
        use ::futures_util::future::TryFutureExt;
  295    293   
        let fut = fut.map_err(
  296    294   
            |e: ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection| {
  297    295   
                ::tracing::debug!(error = %e, "failed to deserialize request");
  298    296   
                ::aws_smithy_http_server::protocol::rpc_v2_cbor::runtime_error::RuntimeError::from(
  299    297   
                    e,
  300    298   
                )
  301    299   
            },
  302    300   
        );
@@ -406,404 +466,463 @@
  426    424   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
  427    425   
        let fut = async move {
  428    426   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
  429    427   
                request.headers(),
  430    428   
                &CONTENT_TYPE_EMPTYSTRUCTOPERATION,
  431    429   
            ) {
  432    430   
                return Err(::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection::NotAcceptable);
  433    431   
            }
  434    432   
            crate::protocol_serde::shape_empty_struct_operation::de_empty_struct_operation_http_request(request)
  435    433   
                            .await
  436         -
                            .map_err(Into::into)
  437    434   
        };
  438    435   
        use ::futures_util::future::TryFutureExt;
  439    436   
        let fut = fut.map_err(
  440    437   
            |e: ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection| {
  441    438   
                ::tracing::debug!(error = %e, "failed to deserialize request");
  442    439   
                ::aws_smithy_http_server::protocol::rpc_v2_cbor::runtime_error::RuntimeError::from(
  443    440   
                    e,
  444    441   
                )
  445    442   
            },
  446    443   
        );
@@ -551,548 +611,607 @@
  571    568   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
  572    569   
        let fut = async move {
  573    570   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
  574    571   
                request.headers(),
  575    572   
                &CONTENT_TYPE_COMPLEXSTRUCTOPERATION,
  576    573   
            ) {
  577    574   
                return Err(::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection::NotAcceptable);
  578    575   
            }
  579    576   
            crate::protocol_serde::shape_complex_struct_operation::de_complex_struct_operation_http_request(request)
  580    577   
                            .await
  581         -
                            .map_err(Into::into)
  582    578   
        };
  583    579   
        use ::futures_util::future::TryFutureExt;
  584    580   
        let fut = fut.map_err(
  585    581   
            |e: ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection| {
  586    582   
                ::tracing::debug!(error = %e, "failed to deserialize request");
  587    583   
                ::aws_smithy_http_server::protocol::rpc_v2_cbor::runtime_error::RuntimeError::from(
  588    584   
                    e,
  589    585   
                )
  590    586   
            },
  591    587   
        );
@@ -656,652 +716,711 @@
  676    672   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
  677    673   
        let fut = async move {
  678    674   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
  679    675   
                request.headers(),
  680    676   
                &CONTENT_TYPE_ERRORSERIALIZATIONOPERATION,
  681    677   
            ) {
  682    678   
                return Err(::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection::NotAcceptable);
  683    679   
            }
  684    680   
            crate::protocol_serde::shape_error_serialization_operation::de_error_serialization_operation_http_request(request)
  685    681   
                            .await
  686         -
                            .map_err(Into::into)
  687    682   
        };
  688    683   
        use ::futures_util::future::TryFutureExt;
  689    684   
        let fut = fut.map_err(
  690    685   
            |e: ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection| {
  691    686   
                ::tracing::debug!(error = %e, "failed to deserialize request");
  692    687   
                ::aws_smithy_http_server::protocol::rpc_v2_cbor::runtime_error::RuntimeError::from(
  693    688   
                    e,
  694    689   
                )
  695    690   
            },
  696    691   
        );
@@ -845,840 +905,899 @@
  865    860   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
  866    861   
        let fut = async move {
  867    862   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
  868    863   
                request.headers(),
  869    864   
                &CONTENT_TYPE_SIMPLESTRUCTOPERATION,
  870    865   
            ) {
  871    866   
                return Err(::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection::NotAcceptable);
  872    867   
            }
  873    868   
            crate::protocol_serde::shape_simple_struct_operation::de_simple_struct_operation_http_request(request)
  874    869   
                            .await
  875         -
                            .map_err(Into::into)
  876    870   
        };
  877    871   
        use ::futures_util::future::TryFutureExt;
  878    872   
        let fut = fut.map_err(
  879    873   
            |e: ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection| {
  880    874   
                ::tracing::debug!(error = %e, "failed to deserialize request");
  881    875   
                ::aws_smithy_http_server::protocol::rpc_v2_cbor::runtime_error::RuntimeError::from(
  882    876   
                    e,
  883    877   
                )
  884    878   
            },
  885    879   
        );

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

@@ -14,14 +76,74 @@
   34     34   
   35     35   
    B::Data: Send,
   36     36   
    ::aws_smithy_http_server::protocol::rest_xml::rejection::RequestRejection:
   37     37   
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
   38     38   
{
   39     39   
    type Rejection = ::aws_smithy_http_server::protocol::rest_xml::runtime_error::RuntimeError;
   40     40   
    type Future = GetObjectInputFuture;
   41     41   
   42     42   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
   43     43   
        let fut = async move {
   44         -
            crate::protocol_serde::shape_get_object::de_get_object_http_request(request)
   45         -
                .await
   46         -
                .map_err(Into::into)
          44  +
            crate::protocol_serde::shape_get_object::de_get_object_http_request(request).await
   47     45   
        };
   48     46   
        use ::futures_util::future::TryFutureExt;
   49     47   
        let fut = fut.map_err(
   50     48   
            |e: ::aws_smithy_http_server::protocol::rest_xml::rejection::RequestRejection| {
   51     49   
                ::tracing::debug!(error = %e, "failed to deserialize request");
   52     50   
                ::aws_smithy_http_server::protocol::rest_xml::runtime_error::RuntimeError::from(e)
   53     51   
            },
   54     52   
        );
   55     53   
        GetObjectInputFuture {
   56     54   
            inner: Box::pin(fut),
@@ -121,119 +181,178 @@
  141    139   
    ::aws_smithy_http_server::protocol::rest_xml::rejection::RequestRejection:
  142    140   
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
  143    141   
{
  144    142   
    type Rejection = ::aws_smithy_http_server::protocol::rest_xml::runtime_error::RuntimeError;
  145    143   
    type Future = DeleteObjectTaggingInputFuture;
  146    144   
  147    145   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
  148    146   
        let fut = async move {
  149    147   
            crate::protocol_serde::shape_delete_object_tagging::de_delete_object_tagging_http_request(request)
  150    148   
                            .await
  151         -
                            .map_err(Into::into)
  152    149   
        };
  153    150   
        use ::futures_util::future::TryFutureExt;
  154    151   
        let fut = fut.map_err(
  155    152   
            |e: ::aws_smithy_http_server::protocol::rest_xml::rejection::RequestRejection| {
  156    153   
                ::tracing::debug!(error = %e, "failed to deserialize request");
  157    154   
                ::aws_smithy_http_server::protocol::rest_xml::runtime_error::RuntimeError::from(e)
  158    155   
            },
  159    156   
        );
  160    157   
        DeleteObjectTaggingInputFuture {
  161    158   
            inner: Box::pin(fut),
@@ -226,223 +286,282 @@
  246    243   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
  247    244   
                request.headers(),
  248    245   
                &CONTENT_TYPE_GETBUCKETLOCATION,
  249    246   
            ) {
  250    247   
                return Err(::aws_smithy_http_server::protocol::rest_xml::rejection::RequestRejection::NotAcceptable);
  251    248   
            }
  252    249   
            crate::protocol_serde::shape_get_bucket_location::de_get_bucket_location_http_request(
  253    250   
                request,
  254    251   
            )
  255    252   
            .await
  256         -
            .map_err(Into::into)
  257    253   
        };
  258    254   
        use ::futures_util::future::TryFutureExt;
  259    255   
        let fut = fut.map_err(
  260    256   
            |e: ::aws_smithy_http_server::protocol::rest_xml::rejection::RequestRejection| {
  261    257   
                ::tracing::debug!(error = %e, "failed to deserialize request");
  262    258   
                ::aws_smithy_http_server::protocol::rest_xml::runtime_error::RuntimeError::from(e)
  263    259   
            },
  264    260   
        );
  265    261   
        GetBucketLocationInputFuture {
  266    262   
            inner: Box::pin(fut),
@@ -373,369 +433,428 @@
  393    389   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
  394    390   
        let fut = async move {
  395    391   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
  396    392   
                request.headers(),
  397    393   
                &CONTENT_TYPE_LISTOBJECTSV2,
  398    394   
            ) {
  399    395   
                return Err(::aws_smithy_http_server::protocol::rest_xml::rejection::RequestRejection::NotAcceptable);
  400    396   
            }
  401    397   
            crate::protocol_serde::shape_list_objects_v2::de_list_objects_v2_http_request(request)
  402    398   
                .await
  403         -
                .map_err(Into::into)
  404    399   
        };
  405    400   
        use ::futures_util::future::TryFutureExt;
  406    401   
        let fut = fut.map_err(
  407    402   
            |e: ::aws_smithy_http_server::protocol::rest_xml::rejection::RequestRejection| {
  408    403   
                ::tracing::debug!(error = %e, "failed to deserialize request");
  409    404   
                ::aws_smithy_http_server::protocol::rest_xml::runtime_error::RuntimeError::from(e)
  410    405   
            },
  411    406   
        );
  412    407   
        ListObjectsV2InputFuture {
  413    408   
            inner: Box::pin(fut),

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

@@ -20,20 +82,80 @@
   40     40   
    type Future = OperationInputFuture;
   41     41   
   42     42   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
   43     43   
        let fut = async move {
   44     44   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
   45     45   
                request.headers(),
   46     46   
                &CONTENT_TYPE_OPERATION,
   47     47   
            ) {
   48     48   
                return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
   49     49   
            }
   50         -
            crate::protocol_serde::shape_operation::de_operation_http_request(request)
   51         -
                .await
   52         -
                .map_err(Into::into)
          50  +
            crate::protocol_serde::shape_operation::de_operation_http_request(request).await
   53     51   
        };
   54     52   
        use ::futures_util::future::TryFutureExt;
   55     53   
        let fut = fut.map_err(
   56     54   
            |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
   57     55   
                ::tracing::debug!(error = %e, "failed to deserialize request");
   58     56   
                ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
   59     57   
                    e,
   60     58   
                )
   61     59   
            },
   62     60   
        );

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

@@ -22,22 +82,81 @@
   42     42   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
   43     43   
        let fut = async move {
   44     44   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
   45     45   
                request.headers(),
   46     46   
                &CONTENT_TYPE_MALFORMEDUNIQUEITEMS,
   47     47   
            ) {
   48     48   
                return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
   49     49   
            }
   50     50   
            crate::protocol_serde::shape_malformed_unique_items::de_malformed_unique_items_http_request(request)
   51     51   
                            .await
   52         -
                            .map_err(Into::into)
   53     52   
        };
   54     53   
        use ::futures_util::future::TryFutureExt;
   55     54   
        let fut = fut.map_err(
   56     55   
            |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
   57     56   
                ::tracing::debug!(error = %e, "failed to deserialize request");
   58     57   
                ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
   59     58   
                    e,
   60     59   
                )
   61     60   
            },
   62     61   
        );