Server Test Python

Server Test Python

rev. 03e6e47f15dfd569240d570d98975ebba692c405

Files changed:

tmp-codegen-diff/codegen-server-test-python/json_rpc11/rust-server-codegen-python/src/operation_shape.rs

@@ -1,1 +533,587 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
    3      3   
/// The example tests how servers must support requests containing a `Content-Type` header with parameters.
    4      4   
pub struct ContentTypeParameters;
    5      5   
    6         -
impl ::aws_smithy_http_server::operation::OperationShape for ContentTypeParameters {
    7         -
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
    8         -
        ::aws_smithy_http_server::shape_id::ShapeId::new(
           6  +
impl ::aws_smithy_legacy_http_server::operation::OperationShape for ContentTypeParameters {
           7  +
    const ID: ::aws_smithy_legacy_http_server::shape_id::ShapeId =
           8  +
        ::aws_smithy_legacy_http_server::shape_id::ShapeId::new(
    9      9   
            "aws.protocoltests.json#ContentTypeParameters",
   10     10   
            "aws.protocoltests.json",
   11     11   
            "ContentTypeParameters",
   12     12   
        );
   13     13   
   14     14   
    type Input = crate::input::ContentTypeParametersInput;
   15     15   
    type Output = crate::output::ContentTypeParametersOutput;
   16     16   
    type Error = crate::error::ContentTypeParametersError;
   17     17   
}
   18     18   
   19         -
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity for ContentTypeParameters {
   20         -
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
   21         -
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
          19  +
impl ::aws_smithy_legacy_http_server::instrumentation::sensitivity::Sensitivity
          20  +
    for ContentTypeParameters
          21  +
{
          22  +
    type RequestFmt =
          23  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
          24  +
    type ResponseFmt =
          25  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
   22     26   
   23     27   
    fn request_fmt() -> Self::RequestFmt {
   24         -
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
          28  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt::new()
   25     29   
    }
   26     30   
   27     31   
    fn response_fmt() -> Self::ResponseFmt {
   28         -
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
          32  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt::new()
   29     33   
    }
   30     34   
}
   31     35   
   32     36   
#[allow(missing_docs)] // documentation missing in model
   33     37   
pub struct PutWithContentEncoding;
   34     38   
   35         -
impl ::aws_smithy_http_server::operation::OperationShape for PutWithContentEncoding {
   36         -
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
   37         -
        ::aws_smithy_http_server::shape_id::ShapeId::new(
          39  +
impl ::aws_smithy_legacy_http_server::operation::OperationShape for PutWithContentEncoding {
          40  +
    const ID: ::aws_smithy_legacy_http_server::shape_id::ShapeId =
          41  +
        ::aws_smithy_legacy_http_server::shape_id::ShapeId::new(
   38     42   
            "aws.protocoltests.json#PutWithContentEncoding",
   39     43   
            "aws.protocoltests.json",
   40     44   
            "PutWithContentEncoding",
   41     45   
        );
   42     46   
   43     47   
    type Input = crate::input::PutWithContentEncodingInput;
   44     48   
    type Output = crate::output::PutWithContentEncodingOutput;
   45     49   
    type Error = crate::error::PutWithContentEncodingError;
   46     50   
}
   47     51   
   48         -
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity
          52  +
impl ::aws_smithy_legacy_http_server::instrumentation::sensitivity::Sensitivity
   49     53   
    for PutWithContentEncoding
   50     54   
{
   51         -
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
   52         -
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
          55  +
    type RequestFmt =
          56  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
          57  +
    type ResponseFmt =
          58  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
   53     59   
   54     60   
    fn request_fmt() -> Self::RequestFmt {
   55         -
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
          61  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt::new()
   56     62   
    }
   57     63   
   58     64   
    fn response_fmt() -> Self::ResponseFmt {
   59         -
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
          65  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt::new()
   60     66   
    }
   61     67   
}
   62     68   
   63     69   
#[allow(missing_docs)] // documentation missing in model
   64     70   
pub struct FractionalSeconds;
   65     71   
   66         -
impl ::aws_smithy_http_server::operation::OperationShape for FractionalSeconds {
   67         -
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
   68         -
        ::aws_smithy_http_server::shape_id::ShapeId::new(
          72  +
impl ::aws_smithy_legacy_http_server::operation::OperationShape for FractionalSeconds {
          73  +
    const ID: ::aws_smithy_legacy_http_server::shape_id::ShapeId =
          74  +
        ::aws_smithy_legacy_http_server::shape_id::ShapeId::new(
   69     75   
            "aws.protocoltests.json#FractionalSeconds",
   70     76   
            "aws.protocoltests.json",
   71     77   
            "FractionalSeconds",
   72     78   
        );
   73     79   
   74     80   
    type Input = crate::input::FractionalSecondsInput;
   75     81   
    type Output = crate::output::FractionalSecondsOutput;
   76     82   
    type Error = crate::error::FractionalSecondsError;
   77     83   
}
   78     84   
   79         -
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity for FractionalSeconds {
   80         -
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
   81         -
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
          85  +
impl ::aws_smithy_legacy_http_server::instrumentation::sensitivity::Sensitivity
          86  +
    for FractionalSeconds
          87  +
{
          88  +
    type RequestFmt =
          89  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
          90  +
    type ResponseFmt =
          91  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
   82     92   
   83     93   
    fn request_fmt() -> Self::RequestFmt {
   84         -
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
          94  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt::new()
   85     95   
    }
   86     96   
   87     97   
    fn response_fmt() -> Self::ResponseFmt {
   88         -
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
          98  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt::new()
   89     99   
    }
   90    100   
}
   91    101   
   92    102   
#[allow(missing_docs)] // documentation missing in model
   93    103   
pub struct DatetimeOffsets;
   94    104   
   95         -
impl ::aws_smithy_http_server::operation::OperationShape for DatetimeOffsets {
   96         -
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
   97         -
        ::aws_smithy_http_server::shape_id::ShapeId::new(
         105  +
impl ::aws_smithy_legacy_http_server::operation::OperationShape for DatetimeOffsets {
         106  +
    const ID: ::aws_smithy_legacy_http_server::shape_id::ShapeId =
         107  +
        ::aws_smithy_legacy_http_server::shape_id::ShapeId::new(
   98    108   
            "aws.protocoltests.json#DatetimeOffsets",
   99    109   
            "aws.protocoltests.json",
  100    110   
            "DatetimeOffsets",
  101    111   
        );
  102    112   
  103    113   
    type Input = crate::input::DatetimeOffsetsInput;
  104    114   
    type Output = crate::output::DatetimeOffsetsOutput;
  105    115   
    type Error = crate::error::DatetimeOffsetsError;
  106    116   
}
  107    117   
  108         -
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity for DatetimeOffsets {
  109         -
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
  110         -
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
         118  +
impl ::aws_smithy_legacy_http_server::instrumentation::sensitivity::Sensitivity
         119  +
    for DatetimeOffsets
         120  +
{
         121  +
    type RequestFmt =
         122  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
         123  +
    type ResponseFmt =
         124  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
  111    125   
  112    126   
    fn request_fmt() -> Self::RequestFmt {
  113         -
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
         127  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt::new()
  114    128   
    }
  115    129   
  116    130   
    fn response_fmt() -> Self::ResponseFmt {
  117         -
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
         131  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt::new()
  118    132   
    }
  119    133   
}
  120    134   
  121    135   
#[allow(missing_docs)] // documentation missing in model
  122    136   
pub struct HostWithPathOperation;
  123    137   
  124         -
impl ::aws_smithy_http_server::operation::OperationShape for HostWithPathOperation {
  125         -
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
  126         -
        ::aws_smithy_http_server::shape_id::ShapeId::new(
         138  +
impl ::aws_smithy_legacy_http_server::operation::OperationShape for HostWithPathOperation {
         139  +
    const ID: ::aws_smithy_legacy_http_server::shape_id::ShapeId =
         140  +
        ::aws_smithy_legacy_http_server::shape_id::ShapeId::new(
  127    141   
            "aws.protocoltests.json#HostWithPathOperation",
  128    142   
            "aws.protocoltests.json",
  129    143   
            "HostWithPathOperation",
  130    144   
        );
  131    145   
  132    146   
    type Input = crate::input::HostWithPathOperationInput;
  133    147   
    type Output = crate::output::HostWithPathOperationOutput;
  134    148   
    type Error = crate::error::HostWithPathOperationError;
  135    149   
}
  136    150   
  137         -
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity for HostWithPathOperation {
  138         -
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
  139         -
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
         151  +
impl ::aws_smithy_legacy_http_server::instrumentation::sensitivity::Sensitivity
         152  +
    for HostWithPathOperation
         153  +
{
         154  +
    type RequestFmt =
         155  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
         156  +
    type ResponseFmt =
         157  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
  140    158   
  141    159   
    fn request_fmt() -> Self::RequestFmt {
  142         -
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
         160  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt::new()
  143    161   
    }
  144    162   
  145    163   
    fn response_fmt() -> Self::ResponseFmt {
  146         -
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
         164  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt::new()
  147    165   
    }
  148    166   
}
  149    167   
  150    168   
#[allow(missing_docs)] // documentation missing in model
  151    169   
pub struct EndpointWithHostLabelOperation;
  152    170   
  153         -
impl ::aws_smithy_http_server::operation::OperationShape for EndpointWithHostLabelOperation {
  154         -
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
  155         -
        ::aws_smithy_http_server::shape_id::ShapeId::new(
         171  +
impl ::aws_smithy_legacy_http_server::operation::OperationShape for EndpointWithHostLabelOperation {
         172  +
    const ID: ::aws_smithy_legacy_http_server::shape_id::ShapeId =
         173  +
        ::aws_smithy_legacy_http_server::shape_id::ShapeId::new(
  156    174   
            "aws.protocoltests.json#EndpointWithHostLabelOperation",
  157    175   
            "aws.protocoltests.json",
  158    176   
            "EndpointWithHostLabelOperation",
  159    177   
        );
  160    178   
  161    179   
    type Input = crate::input::EndpointWithHostLabelOperationInput;
  162    180   
    type Output = crate::output::EndpointWithHostLabelOperationOutput;
  163    181   
    type Error = crate::error::EndpointWithHostLabelOperationError;
  164    182   
}
  165    183   
  166         -
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity
         184  +
impl ::aws_smithy_legacy_http_server::instrumentation::sensitivity::Sensitivity
  167    185   
    for EndpointWithHostLabelOperation
  168    186   
{
  169         -
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
  170         -
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
         187  +
    type RequestFmt =
         188  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
         189  +
    type ResponseFmt =
         190  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
  171    191   
  172    192   
    fn request_fmt() -> Self::RequestFmt {
  173         -
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
         193  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt::new()
  174    194   
    }
  175    195   
  176    196   
    fn response_fmt() -> Self::ResponseFmt {
  177         -
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
         197  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt::new()
  178    198   
    }
  179    199   
}
  180    200   
  181    201   
#[allow(missing_docs)] // documentation missing in model
  182    202   
pub struct EndpointOperation;
  183    203   
  184         -
impl ::aws_smithy_http_server::operation::OperationShape for EndpointOperation {
  185         -
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
  186         -
        ::aws_smithy_http_server::shape_id::ShapeId::new(
         204  +
impl ::aws_smithy_legacy_http_server::operation::OperationShape for EndpointOperation {
         205  +
    const ID: ::aws_smithy_legacy_http_server::shape_id::ShapeId =
         206  +
        ::aws_smithy_legacy_http_server::shape_id::ShapeId::new(
  187    207   
            "aws.protocoltests.json#EndpointOperation",
  188    208   
            "aws.protocoltests.json",
  189    209   
            "EndpointOperation",
  190    210   
        );
  191    211   
  192    212   
    type Input = crate::input::EndpointOperationInput;
  193    213   
    type Output = crate::output::EndpointOperationOutput;
  194    214   
    type Error = crate::error::EndpointOperationError;
  195    215   
}
  196    216   
  197         -
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity for EndpointOperation {
  198         -
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
  199         -
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
         217  +
impl ::aws_smithy_legacy_http_server::instrumentation::sensitivity::Sensitivity
         218  +
    for EndpointOperation
         219  +
{
         220  +
    type RequestFmt =
         221  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
         222  +
    type ResponseFmt =
         223  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
  200    224   
  201    225   
    fn request_fmt() -> Self::RequestFmt {
  202         -
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
         226  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt::new()
  203    227   
    }
  204    228   
  205    229   
    fn response_fmt() -> Self::ResponseFmt {
  206         -
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
         230  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt::new()
  207    231   
    }
  208    232   
}
  209    233   
  210    234   
/// This operation uses unions for inputs and outputs.
  211    235   
pub struct JsonUnions;
  212    236   
  213         -
impl ::aws_smithy_http_server::operation::OperationShape for JsonUnions {
  214         -
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
  215         -
        ::aws_smithy_http_server::shape_id::ShapeId::new(
         237  +
impl ::aws_smithy_legacy_http_server::operation::OperationShape for JsonUnions {
         238  +
    const ID: ::aws_smithy_legacy_http_server::shape_id::ShapeId =
         239  +
        ::aws_smithy_legacy_http_server::shape_id::ShapeId::new(
  216    240   
            "aws.protocoltests.json#JsonUnions",
  217    241   
            "aws.protocoltests.json",
  218    242   
            "JsonUnions",
  219    243   
        );
  220    244   
  221    245   
    type Input = crate::input::JsonUnionsInput;
  222    246   
    type Output = crate::output::JsonUnionsOutput;
  223    247   
    type Error = crate::error::JsonUnionsError;
  224    248   
}
  225    249   
  226         -
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity for JsonUnions {
  227         -
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
  228         -
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
         250  +
impl ::aws_smithy_legacy_http_server::instrumentation::sensitivity::Sensitivity for JsonUnions {
         251  +
    type RequestFmt =
         252  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
         253  +
    type ResponseFmt =
         254  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
  229    255   
  230    256   
    fn request_fmt() -> Self::RequestFmt {
  231         -
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
         257  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt::new()
  232    258   
    }
  233    259   
  234    260   
    fn response_fmt() -> Self::ResponseFmt {
  235         -
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
         261  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt::new()
  236    262   
    }
  237    263   
}
  238    264   
  239    265   
/// This operation has three possible return values: 1. A successful response in the form of GreetingWithErrorsOutput 2. An InvalidGreeting error. 3. A ComplexError error. Implementations must be able to successfully take a response and properly deserialize successful and error responses.
  240    266   
pub struct GreetingWithErrors;
  241    267   
  242         -
impl ::aws_smithy_http_server::operation::OperationShape for GreetingWithErrors {
  243         -
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
  244         -
        ::aws_smithy_http_server::shape_id::ShapeId::new(
         268  +
impl ::aws_smithy_legacy_http_server::operation::OperationShape for GreetingWithErrors {
         269  +
    const ID: ::aws_smithy_legacy_http_server::shape_id::ShapeId =
         270  +
        ::aws_smithy_legacy_http_server::shape_id::ShapeId::new(
  245    271   
            "aws.protocoltests.json#GreetingWithErrors",
  246    272   
            "aws.protocoltests.json",
  247    273   
            "GreetingWithErrors",
  248    274   
        );
  249    275   
  250    276   
    type Input = crate::input::GreetingWithErrorsInput;
  251    277   
    type Output = crate::output::GreetingWithErrorsOutput;
  252    278   
    type Error = crate::error::GreetingWithErrorsError;
  253    279   
}
  254    280   
  255         -
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity for GreetingWithErrors {
  256         -
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
  257         -
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
         281  +
impl ::aws_smithy_legacy_http_server::instrumentation::sensitivity::Sensitivity
         282  +
    for GreetingWithErrors
         283  +
{
         284  +
    type RequestFmt =
         285  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
         286  +
    type ResponseFmt =
         287  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
  258    288   
  259    289   
    fn request_fmt() -> Self::RequestFmt {
  260         -
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
         290  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt::new()
  261    291   
    }
  262    292   
  263    293   
    fn response_fmt() -> Self::ResponseFmt {
  264         -
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
         294  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt::new()
  265    295   
    }
  266    296   
}
  267    297   
  268    298   
#[allow(missing_docs)] // documentation missing in model
  269    299   
pub struct SparseNullsOperation;
  270    300   
  271         -
impl ::aws_smithy_http_server::operation::OperationShape for SparseNullsOperation {
  272         -
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
  273         -
        ::aws_smithy_http_server::shape_id::ShapeId::new(
         301  +
impl ::aws_smithy_legacy_http_server::operation::OperationShape for SparseNullsOperation {
         302  +
    const ID: ::aws_smithy_legacy_http_server::shape_id::ShapeId =
         303  +
        ::aws_smithy_legacy_http_server::shape_id::ShapeId::new(
  274    304   
            "aws.protocoltests.json#SparseNullsOperation",
  275    305   
            "aws.protocoltests.json",
  276    306   
            "SparseNullsOperation",
  277    307   
        );
  278    308   
  279    309   
    type Input = crate::input::SparseNullsOperationInput;
  280    310   
    type Output = crate::output::SparseNullsOperationOutput;
  281    311   
    type Error = crate::error::SparseNullsOperationError;
  282    312   
}
  283    313   
  284         -
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity for SparseNullsOperation {
  285         -
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
  286         -
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
         314  +
impl ::aws_smithy_legacy_http_server::instrumentation::sensitivity::Sensitivity
         315  +
    for SparseNullsOperation
         316  +
{
         317  +
    type RequestFmt =
         318  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
         319  +
    type ResponseFmt =
         320  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
  287    321   
  288    322   
    fn request_fmt() -> Self::RequestFmt {
  289         -
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
         323  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt::new()
  290    324   
    }
  291    325   
  292    326   
    fn response_fmt() -> Self::ResponseFmt {
  293         -
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
         327  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt::new()
  294    328   
    }
  295    329   
}
  296    330   
  297    331   
#[allow(missing_docs)] // documentation missing in model
  298    332   
pub struct NullOperation;
  299    333   
  300         -
impl ::aws_smithy_http_server::operation::OperationShape for NullOperation {
  301         -
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
  302         -
        ::aws_smithy_http_server::shape_id::ShapeId::new(
         334  +
impl ::aws_smithy_legacy_http_server::operation::OperationShape for NullOperation {
         335  +
    const ID: ::aws_smithy_legacy_http_server::shape_id::ShapeId =
         336  +
        ::aws_smithy_legacy_http_server::shape_id::ShapeId::new(
  303    337   
            "aws.protocoltests.json#NullOperation",
  304    338   
            "aws.protocoltests.json",
  305    339   
            "NullOperation",
  306    340   
        );
  307    341   
  308    342   
    type Input = crate::input::NullOperationInput;
  309    343   
    type Output = crate::output::NullOperationOutput;
  310    344   
    type Error = crate::error::NullOperationError;
  311    345   
}
  312    346   
  313         -
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity for NullOperation {
  314         -
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
  315         -
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
         347  +
impl ::aws_smithy_legacy_http_server::instrumentation::sensitivity::Sensitivity for NullOperation {
         348  +
    type RequestFmt =
         349  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
         350  +
    type ResponseFmt =
         351  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
  316    352   
  317    353   
    fn request_fmt() -> Self::RequestFmt {
  318         -
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
         354  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt::new()
  319    355   
    }
  320    356   
  321    357   
    fn response_fmt() -> Self::ResponseFmt {
  322         -
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
         358  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt::new()
  323    359   
    }
  324    360   
}
  325    361   
  326    362   
/// This example serializes intEnums as top level properties, in lists, sets, and maps.
  327    363   
pub struct JsonIntEnums;
  328    364   
  329         -
impl ::aws_smithy_http_server::operation::OperationShape for JsonIntEnums {
  330         -
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
  331         -
        ::aws_smithy_http_server::shape_id::ShapeId::new(
         365  +
impl ::aws_smithy_legacy_http_server::operation::OperationShape for JsonIntEnums {
         366  +
    const ID: ::aws_smithy_legacy_http_server::shape_id::ShapeId =
         367  +
        ::aws_smithy_legacy_http_server::shape_id::ShapeId::new(
  332    368   
            "aws.protocoltests.json#JsonIntEnums",
  333    369   
            "aws.protocoltests.json",
  334    370   
            "JsonIntEnums",
  335    371   
        );
  336    372   
  337    373   
    type Input = crate::input::JsonIntEnumsInput;
  338    374   
    type Output = crate::output::JsonIntEnumsOutput;
  339    375   
    type Error = crate::error::JsonIntEnumsError;
  340    376   
}
  341    377   
  342         -
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity for JsonIntEnums {
  343         -
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
  344         -
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
         378  +
impl ::aws_smithy_legacy_http_server::instrumentation::sensitivity::Sensitivity for JsonIntEnums {
         379  +
    type RequestFmt =
         380  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
         381  +
    type ResponseFmt =
         382  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
  345    383   
  346    384   
    fn request_fmt() -> Self::RequestFmt {
  347         -
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
         385  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt::new()
  348    386   
    }
  349    387   
  350    388   
    fn response_fmt() -> Self::ResponseFmt {
  351         -
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
         389  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt::new()
  352    390   
    }
  353    391   
}
  354    392   
  355    393   
/// This example serializes enums as top level properties, in lists, sets, and maps.
  356    394   
pub struct JsonEnums;
  357    395   
  358         -
impl ::aws_smithy_http_server::operation::OperationShape for JsonEnums {
  359         -
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
  360         -
        ::aws_smithy_http_server::shape_id::ShapeId::new(
         396  +
impl ::aws_smithy_legacy_http_server::operation::OperationShape for JsonEnums {
         397  +
    const ID: ::aws_smithy_legacy_http_server::shape_id::ShapeId =
         398  +
        ::aws_smithy_legacy_http_server::shape_id::ShapeId::new(
  361    399   
            "aws.protocoltests.json#JsonEnums",
  362    400   
            "aws.protocoltests.json",
  363    401   
            "JsonEnums",
  364    402   
        );
  365    403   
  366    404   
    type Input = crate::input::JsonEnumsInput;
  367    405   
    type Output = crate::output::JsonEnumsOutput;
  368    406   
    type Error = crate::error::JsonEnumsError;
  369    407   
}
  370    408   
  371         -
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity for JsonEnums {
  372         -
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
  373         -
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
         409  +
impl ::aws_smithy_legacy_http_server::instrumentation::sensitivity::Sensitivity for JsonEnums {
         410  +
    type RequestFmt =
         411  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
         412  +
    type ResponseFmt =
         413  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
  374    414   
  375    415   
    fn request_fmt() -> Self::RequestFmt {
  376         -
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
         416  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt::new()
  377    417   
    }
  378    418   
  379    419   
    fn response_fmt() -> Self::ResponseFmt {
  380         -
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
         420  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt::new()
  381    421   
    }
  382    422   
}
  383    423   
  384    424   
/// This example serializes an inline document as part of the payload.
  385    425   
pub struct PutAndGetInlineDocuments;
  386    426   
  387         -
impl ::aws_smithy_http_server::operation::OperationShape for PutAndGetInlineDocuments {
  388         -
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
  389         -
        ::aws_smithy_http_server::shape_id::ShapeId::new(
         427  +
impl ::aws_smithy_legacy_http_server::operation::OperationShape for PutAndGetInlineDocuments {
         428  +
    const ID: ::aws_smithy_legacy_http_server::shape_id::ShapeId =
         429  +
        ::aws_smithy_legacy_http_server::shape_id::ShapeId::new(
  390    430   
            "aws.protocoltests.json#PutAndGetInlineDocuments",
  391    431   
            "aws.protocoltests.json",
  392    432   
            "PutAndGetInlineDocuments",
  393    433   
        );
  394    434   
  395    435   
    type Input = crate::input::PutAndGetInlineDocumentsInput;
  396    436   
    type Output = crate::output::PutAndGetInlineDocumentsOutput;
  397    437   
    type Error = crate::error::PutAndGetInlineDocumentsError;
  398    438   
}
  399    439   
  400         -
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity
         440  +
impl ::aws_smithy_legacy_http_server::instrumentation::sensitivity::Sensitivity
  401    441   
    for PutAndGetInlineDocuments
  402    442   
{
  403         -
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
  404         -
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
         443  +
    type RequestFmt =
         444  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
         445  +
    type ResponseFmt =
         446  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
  405    447   
  406    448   
    fn request_fmt() -> Self::RequestFmt {
  407         -
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
         449  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt::new()
  408    450   
    }
  409    451   
  410    452   
    fn response_fmt() -> Self::ResponseFmt {
  411         -
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
         453  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt::new()
  412    454   
    }
  413    455   
}
  414    456   
  415    457   
#[allow(missing_docs)] // documentation missing in model
  416    458   
pub struct OperationWithOptionalInputOutput;
  417    459   
  418         -
impl ::aws_smithy_http_server::operation::OperationShape for OperationWithOptionalInputOutput {
  419         -
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
  420         -
        ::aws_smithy_http_server::shape_id::ShapeId::new(
         460  +
impl ::aws_smithy_legacy_http_server::operation::OperationShape
         461  +
    for OperationWithOptionalInputOutput
         462  +
{
         463  +
    const ID: ::aws_smithy_legacy_http_server::shape_id::ShapeId =
         464  +
        ::aws_smithy_legacy_http_server::shape_id::ShapeId::new(
  421    465   
            "aws.protocoltests.json#OperationWithOptionalInputOutput",
  422    466   
            "aws.protocoltests.json",
  423    467   
            "OperationWithOptionalInputOutput",
  424    468   
        );
  425    469   
  426    470   
    type Input = crate::input::OperationWithOptionalInputOutputInput;
  427    471   
    type Output = crate::output::OperationWithOptionalInputOutputOutput;
  428    472   
    type Error = crate::error::OperationWithOptionalInputOutputError;
  429    473   
}
  430    474   
  431         -
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity
         475  +
impl ::aws_smithy_legacy_http_server::instrumentation::sensitivity::Sensitivity
  432    476   
    for OperationWithOptionalInputOutput
  433    477   
{
  434         -
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
  435         -
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
         478  +
    type RequestFmt =
         479  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
         480  +
    type ResponseFmt =
         481  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
  436    482   
  437    483   
    fn request_fmt() -> Self::RequestFmt {
  438         -
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
         484  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt::new()
  439    485   
    }
  440    486   
  441    487   
    fn response_fmt() -> Self::ResponseFmt {
  442         -
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
         488  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt::new()
  443    489   
    }
  444    490   
}
  445    491   
  446    492   
#[allow(missing_docs)] // documentation missing in model
  447    493   
pub struct SimpleScalarProperties;
  448    494   
  449         -
impl ::aws_smithy_http_server::operation::OperationShape for SimpleScalarProperties {
  450         -
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
  451         -
        ::aws_smithy_http_server::shape_id::ShapeId::new(
         495  +
impl ::aws_smithy_legacy_http_server::operation::OperationShape for SimpleScalarProperties {
         496  +
    const ID: ::aws_smithy_legacy_http_server::shape_id::ShapeId =
         497  +
        ::aws_smithy_legacy_http_server::shape_id::ShapeId::new(
  452    498   
            "aws.protocoltests.json#SimpleScalarProperties",
  453    499   
            "aws.protocoltests.json",
  454    500   
            "SimpleScalarProperties",
  455    501   
        );
  456    502   
  457    503   
    type Input = crate::input::SimpleScalarPropertiesInput;
  458    504   
    type Output = crate::output::SimpleScalarPropertiesOutput;
  459    505   
    type Error = crate::error::SimpleScalarPropertiesError;
  460    506   
}
  461    507   
  462         -
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity
         508  +
impl ::aws_smithy_legacy_http_server::instrumentation::sensitivity::Sensitivity
  463    509   
    for SimpleScalarProperties
  464    510   
{
  465         -
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
  466         -
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
         511  +
    type RequestFmt =
         512  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
         513  +
    type ResponseFmt =
         514  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
  467    515   
  468    516   
    fn request_fmt() -> Self::RequestFmt {
  469         -
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
         517  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt::new()
  470    518   
    }
  471    519   
  472    520   
    fn response_fmt() -> Self::ResponseFmt {
  473         -
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
         521  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt::new()
  474    522   
    }
  475    523   
}
  476    524   
  477    525   
#[allow(missing_docs)] // documentation missing in model
  478    526   
pub struct KitchenSinkOperation;
  479    527   
  480         -
impl ::aws_smithy_http_server::operation::OperationShape for KitchenSinkOperation {
  481         -
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
  482         -
        ::aws_smithy_http_server::shape_id::ShapeId::new(
         528  +
impl ::aws_smithy_legacy_http_server::operation::OperationShape for KitchenSinkOperation {
         529  +
    const ID: ::aws_smithy_legacy_http_server::shape_id::ShapeId =
         530  +
        ::aws_smithy_legacy_http_server::shape_id::ShapeId::new(
  483    531   
            "aws.protocoltests.json#KitchenSinkOperation",
  484    532   
            "aws.protocoltests.json",
  485    533   
            "KitchenSinkOperation",
  486    534   
        );
  487    535   
  488    536   
    type Input = crate::input::KitchenSinkOperationInput;
  489    537   
    type Output = crate::output::KitchenSinkOperationOutput;
  490    538   
    type Error = crate::error::KitchenSinkOperationError;
  491    539   
}
  492    540   
  493         -
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity for KitchenSinkOperation {
  494         -
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
  495         -
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
         541  +
impl ::aws_smithy_legacy_http_server::instrumentation::sensitivity::Sensitivity
         542  +
    for KitchenSinkOperation
         543  +
{
         544  +
    type RequestFmt =
         545  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
         546  +
    type ResponseFmt =
         547  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
  496    548   
  497    549   
    fn request_fmt() -> Self::RequestFmt {
  498         -
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
         550  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt::new()
  499    551   
    }
  500    552   
  501    553   
    fn response_fmt() -> Self::ResponseFmt {
  502         -
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
         554  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt::new()
  503    555   
    }
  504    556   
}
  505    557   
  506    558   
#[allow(missing_docs)] // documentation missing in model
  507    559   
pub struct EmptyOperation;
  508    560   
  509         -
impl ::aws_smithy_http_server::operation::OperationShape for EmptyOperation {
  510         -
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
  511         -
        ::aws_smithy_http_server::shape_id::ShapeId::new(
         561  +
impl ::aws_smithy_legacy_http_server::operation::OperationShape for EmptyOperation {
         562  +
    const ID: ::aws_smithy_legacy_http_server::shape_id::ShapeId =
         563  +
        ::aws_smithy_legacy_http_server::shape_id::ShapeId::new(
  512    564   
            "aws.protocoltests.json#EmptyOperation",
  513    565   
            "aws.protocoltests.json",
  514    566   
            "EmptyOperation",
  515    567   
        );
  516    568   
  517    569   
    type Input = crate::input::EmptyOperationInput;
  518    570   
    type Output = crate::output::EmptyOperationOutput;
  519    571   
    type Error = crate::error::EmptyOperationError;
  520    572   
}
  521    573   
  522         -
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity for EmptyOperation {
  523         -
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
  524         -
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
         574  +
impl ::aws_smithy_legacy_http_server::instrumentation::sensitivity::Sensitivity for EmptyOperation {
         575  +
    type RequestFmt =
         576  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
         577  +
    type ResponseFmt =
         578  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
  525    579   
  526    580   
    fn request_fmt() -> Self::RequestFmt {
  527         -
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
         581  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt::new()
  528    582   
    }
  529    583   
  530    584   
    fn response_fmt() -> Self::ResponseFmt {
  531         -
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
         585  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt::new()
  532    586   
    }
  533    587   
}

tmp-codegen-diff/codegen-server-test-python/json_rpc11/rust-server-codegen-python/src/protocol_serde/shape_content_type_parameters.rs

@@ -1,1 +125,125 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
#[allow(clippy::unnecessary_wraps)]
    3      3   
pub async fn de_content_type_parameters_http_request<B>(
    4      4   
    #[allow(unused_variables)] request: ::http::Request<B>,
    5      5   
) -> std::result::Result<
    6      6   
    crate::input::ContentTypeParametersInput,
    7         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection,
           7  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection,
    8      8   
>
    9      9   
where
   10         -
    B: ::aws_smithy_http_server::body::HttpBody + Send,
          10  +
    B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
   11     11   
    B::Data: Send,
   12         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection:
   13         -
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
          12  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection:
          13  +
        From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
   14     14   
{
   15     15   
    Ok({
   16     16   
        #[allow(unused_mut)]
   17     17   
        let mut input = crate::input::content_type_parameters_input_internal::Builder::default();
   18     18   
        #[allow(unused_variables)]
   19     19   
        let ::aws_smithy_runtime_api::http::RequestParts {
   20     20   
            uri, headers, body, ..
   21     21   
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
   22     22   
        let bytes = ::hyper::body::to_bytes(body).await?;
   23     23   
        if !bytes.is_empty() {
   24         -
            ::aws_smithy_http_server::protocol::content_type_header_classifier_smithy(
          24  +
            ::aws_smithy_legacy_http_server::protocol::content_type_header_classifier_smithy(
   25     25   
                &headers,
   26     26   
                Some("application/x-amz-json-1.1"),
   27     27   
            )?;
   28     28   
            input =
   29     29   
                crate::protocol_serde::shape_content_type_parameters::de_content_type_parameters(
   30     30   
                    bytes.as_ref(),
   31     31   
                    input,
   32     32   
                )?;
   33     33   
        }
   34     34   
        input.build()
   35     35   
    })
   36     36   
}
   37     37   
   38     38   
#[allow(clippy::unnecessary_wraps)]
   39     39   
pub fn ser_content_type_parameters_http_response(
   40     40   
    #[allow(unused_variables)] output: crate::output::ContentTypeParametersOutput,
   41     41   
) -> std::result::Result<
   42         -
    ::aws_smithy_http_server::response::Response,
   43         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::ResponseRejection,
          42  +
    ::aws_smithy_legacy_http_server::response::Response,
          43  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::ResponseRejection,
   44     44   
> {
   45     45   
    Ok({
   46     46   
        #[allow(unused_mut)]
   47     47   
        let mut builder = ::http::Response::builder();
   48         -
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
          48  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   49     49   
            builder,
   50     50   
            ::http::header::CONTENT_TYPE,
   51     51   
            "application/x-amz-json-1.1",
   52     52   
        );
   53     53   
        let http_status: u16 = 200;
   54     54   
        builder = builder.status(http_status);
   55     55   
        let payload =
   56     56   
            crate::protocol_serde::shape_content_type_parameters_output::ser_content_type_parameters_output_output_output(&output)?
   57     57   
        ;
   58     58   
        let content_length = payload.len();
   59         -
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
          59  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   60     60   
            builder,
   61     61   
            ::http::header::CONTENT_LENGTH,
   62     62   
            content_length,
   63     63   
        );
   64         -
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
          64  +
        let body = ::aws_smithy_legacy_http_server::body::to_boxed(payload);
   65     65   
        builder.body(body)?
   66     66   
    })
   67     67   
}
   68     68   
   69     69   
#[allow(clippy::unnecessary_wraps)]
   70     70   
pub fn ser_content_type_parameters_http_error(
   71     71   
    error: &crate::error::ContentTypeParametersError,
   72     72   
) -> std::result::Result<
   73         -
    ::aws_smithy_http_server::response::Response,
   74         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::ResponseRejection,
          73  +
    ::aws_smithy_legacy_http_server::response::Response,
          74  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::ResponseRejection,
   75     75   
> {
   76     76   
    Ok({
   77     77   
        match error {
   78     78   
            crate::error::ContentTypeParametersError::InternalServerError(output) => {
   79     79   
                let payload = crate::protocol_serde::shape_internal_server_error::ser_internal_server_error_error(output)?;
   80     80   
                #[allow(unused_mut)]
   81     81   
                let mut builder = ::http::Response::builder();
   82         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          82  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   83     83   
                    builder,
   84     84   
                    ::http::header::CONTENT_TYPE,
   85     85   
                    "application/x-amz-json-1.1",
   86     86   
                );
   87     87   
                let content_length = payload.len();
   88         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          88  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   89     89   
                    builder,
   90     90   
                    ::http::header::CONTENT_LENGTH,
   91     91   
                    content_length,
   92     92   
                );
   93     93   
                builder
   94     94   
                    .status(500)
   95         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
          95  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
   96     96   
            }
   97     97   
        }
   98     98   
    })
   99     99   
}
  100    100   
  101    101   
pub(crate) fn de_content_type_parameters(
  102    102   
    value: &[u8],
  103    103   
    mut builder: crate::input::content_type_parameters_input_internal::Builder,
  104    104   
) -> ::std::result::Result<
  105    105   
    crate::input::content_type_parameters_input_internal::Builder,

tmp-codegen-diff/codegen-server-test-python/json_rpc11/rust-server-codegen-python/src/protocol_serde/shape_datetime_offsets.rs

@@ -1,1 +87,87 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
#[allow(clippy::unnecessary_wraps)]
    3      3   
pub async fn de_datetime_offsets_http_request<B>(
    4      4   
    #[allow(unused_variables)] request: ::http::Request<B>,
    5      5   
) -> std::result::Result<
    6      6   
    crate::input::DatetimeOffsetsInput,
    7         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection,
           7  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection,
    8      8   
>
    9      9   
where
   10         -
    B: ::aws_smithy_http_server::body::HttpBody + Send,
          10  +
    B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
   11     11   
    B::Data: Send,
   12         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection:
   13         -
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
          12  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection:
          13  +
        From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
   14     14   
{
   15     15   
    Ok({
   16     16   
        #[allow(unused_mut)]
   17     17   
        let mut input = crate::input::datetime_offsets_input_internal::Builder::default();
   18     18   
        #[allow(unused_variables)]
   19     19   
        let ::aws_smithy_runtime_api::http::RequestParts {
   20     20   
            uri, headers, body, ..
   21     21   
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
   22     22   
        input.build()
   23     23   
    })
   24     24   
}
   25     25   
   26     26   
#[allow(clippy::unnecessary_wraps)]
   27     27   
pub fn ser_datetime_offsets_http_response(
   28     28   
    #[allow(unused_variables)] output: crate::output::DatetimeOffsetsOutput,
   29     29   
) -> std::result::Result<
   30         -
    ::aws_smithy_http_server::response::Response,
   31         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::ResponseRejection,
          30  +
    ::aws_smithy_legacy_http_server::response::Response,
          31  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::ResponseRejection,
   32     32   
> {
   33     33   
    Ok({
   34     34   
        #[allow(unused_mut)]
   35     35   
        let mut builder = ::http::Response::builder();
   36         -
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
          36  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   37     37   
            builder,
   38     38   
            ::http::header::CONTENT_TYPE,
   39     39   
            "application/x-amz-json-1.1",
   40     40   
        );
   41     41   
        let http_status: u16 = 200;
   42     42   
        builder = builder.status(http_status);
   43     43   
        let payload =
   44     44   
            crate::protocol_serde::shape_datetime_offsets_output::ser_datetime_offsets_output_output_output(&output)?
   45     45   
        ;
   46     46   
        let content_length = payload.len();
   47         -
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
          47  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   48     48   
            builder,
   49     49   
            ::http::header::CONTENT_LENGTH,
   50     50   
            content_length,
   51     51   
        );
   52         -
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
          52  +
        let body = ::aws_smithy_legacy_http_server::body::to_boxed(payload);
   53     53   
        builder.body(body)?
   54     54   
    })
   55     55   
}
   56     56   
   57     57   
#[allow(clippy::unnecessary_wraps)]
   58     58   
pub fn ser_datetime_offsets_http_error(
   59     59   
    error: &crate::error::DatetimeOffsetsError,
   60     60   
) -> std::result::Result<
   61         -
    ::aws_smithy_http_server::response::Response,
   62         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::ResponseRejection,
          61  +
    ::aws_smithy_legacy_http_server::response::Response,
          62  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::ResponseRejection,
   63     63   
> {
   64     64   
    Ok({
   65     65   
        match error {
   66     66   
            crate::error::DatetimeOffsetsError::InternalServerError(output) => {
   67     67   
                let payload = crate::protocol_serde::shape_internal_server_error::ser_internal_server_error_error(output)?;
   68     68   
                #[allow(unused_mut)]
   69     69   
                let mut builder = ::http::Response::builder();
   70         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          70  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   71     71   
                    builder,
   72     72   
                    ::http::header::CONTENT_TYPE,
   73     73   
                    "application/x-amz-json-1.1",
   74     74   
                );
   75     75   
                let content_length = payload.len();
   76         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          76  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   77     77   
                    builder,
   78     78   
                    ::http::header::CONTENT_LENGTH,
   79     79   
                    content_length,
   80     80   
                );
   81     81   
                builder
   82     82   
                    .status(500)
   83         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
          83  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
   84     84   
            }
   85     85   
        }
   86     86   
    })
   87     87   
}

tmp-codegen-diff/codegen-server-test-python/json_rpc11/rust-server-codegen-python/src/protocol_serde/shape_empty_operation.rs

@@ -1,1 +85,85 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
#[allow(clippy::unnecessary_wraps)]
    3      3   
pub async fn de_empty_operation_http_request<B>(
    4      4   
    #[allow(unused_variables)] request: ::http::Request<B>,
    5      5   
) -> std::result::Result<
    6      6   
    crate::input::EmptyOperationInput,
    7         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection,
           7  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection,
    8      8   
>
    9      9   
where
   10         -
    B: ::aws_smithy_http_server::body::HttpBody + Send,
          10  +
    B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
   11     11   
    B::Data: Send,
   12         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection:
   13         -
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
          12  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection:
          13  +
        From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
   14     14   
{
   15     15   
    Ok({
   16     16   
        #[allow(unused_mut)]
   17     17   
        let mut input = crate::input::empty_operation_input_internal::Builder::default();
   18     18   
        #[allow(unused_variables)]
   19     19   
        let ::aws_smithy_runtime_api::http::RequestParts {
   20     20   
            uri, headers, body, ..
   21     21   
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
   22     22   
        input.build()
   23     23   
    })
   24     24   
}
   25     25   
   26     26   
#[allow(clippy::unnecessary_wraps)]
   27     27   
pub fn ser_empty_operation_http_response(
   28     28   
    #[allow(unused_variables)] output: crate::output::EmptyOperationOutput,
   29     29   
) -> std::result::Result<
   30         -
    ::aws_smithy_http_server::response::Response,
   31         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::ResponseRejection,
          30  +
    ::aws_smithy_legacy_http_server::response::Response,
          31  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::ResponseRejection,
   32     32   
> {
   33     33   
    Ok({
   34     34   
        #[allow(unused_mut)]
   35     35   
        let mut builder = ::http::Response::builder();
   36         -
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
          36  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   37     37   
            builder,
   38     38   
            ::http::header::CONTENT_TYPE,
   39     39   
            "application/x-amz-json-1.1",
   40     40   
        );
   41     41   
        let http_status: u16 = 200;
   42     42   
        builder = builder.status(http_status);
   43     43   
        let payload = "";
   44     44   
        let content_length = payload.len();
   45         -
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
          45  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   46     46   
            builder,
   47     47   
            ::http::header::CONTENT_LENGTH,
   48     48   
            content_length,
   49     49   
        );
   50         -
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
          50  +
        let body = ::aws_smithy_legacy_http_server::body::to_boxed(payload);
   51     51   
        builder.body(body)?
   52     52   
    })
   53     53   
}
   54     54   
   55     55   
#[allow(clippy::unnecessary_wraps)]
   56     56   
pub fn ser_empty_operation_http_error(
   57     57   
    error: &crate::error::EmptyOperationError,
   58     58   
) -> std::result::Result<
   59         -
    ::aws_smithy_http_server::response::Response,
   60         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::ResponseRejection,
          59  +
    ::aws_smithy_legacy_http_server::response::Response,
          60  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::ResponseRejection,
   61     61   
> {
   62     62   
    Ok({
   63     63   
        match error {
   64     64   
            crate::error::EmptyOperationError::InternalServerError(output) => {
   65     65   
                let payload = crate::protocol_serde::shape_internal_server_error::ser_internal_server_error_error(output)?;
   66     66   
                #[allow(unused_mut)]
   67     67   
                let mut builder = ::http::Response::builder();
   68         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          68  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   69     69   
                    builder,
   70     70   
                    ::http::header::CONTENT_TYPE,
   71     71   
                    "application/x-amz-json-1.1",
   72     72   
                );
   73     73   
                let content_length = payload.len();
   74         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          74  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   75     75   
                    builder,
   76     76   
                    ::http::header::CONTENT_LENGTH,
   77     77   
                    content_length,
   78     78   
                );
   79     79   
                builder
   80     80   
                    .status(500)
   81         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
          81  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
   82     82   
            }
   83     83   
        }
   84     84   
    })
   85     85   
}

tmp-codegen-diff/codegen-server-test-python/json_rpc11/rust-server-codegen-python/src/protocol_serde/shape_endpoint_operation.rs

@@ -1,1 +85,85 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
#[allow(clippy::unnecessary_wraps)]
    3      3   
pub async fn de_endpoint_operation_http_request<B>(
    4      4   
    #[allow(unused_variables)] request: ::http::Request<B>,
    5      5   
) -> std::result::Result<
    6      6   
    crate::input::EndpointOperationInput,
    7         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection,
           7  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection,
    8      8   
>
    9      9   
where
   10         -
    B: ::aws_smithy_http_server::body::HttpBody + Send,
          10  +
    B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
   11     11   
    B::Data: Send,
   12         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection:
   13         -
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
          12  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection:
          13  +
        From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
   14     14   
{
   15     15   
    Ok({
   16     16   
        #[allow(unused_mut)]
   17     17   
        let mut input = crate::input::endpoint_operation_input_internal::Builder::default();
   18     18   
        #[allow(unused_variables)]
   19     19   
        let ::aws_smithy_runtime_api::http::RequestParts {
   20     20   
            uri, headers, body, ..
   21     21   
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
   22     22   
        input.build()
   23     23   
    })
   24     24   
}
   25     25   
   26     26   
#[allow(clippy::unnecessary_wraps)]
   27     27   
pub fn ser_endpoint_operation_http_response(
   28     28   
    #[allow(unused_variables)] output: crate::output::EndpointOperationOutput,
   29     29   
) -> std::result::Result<
   30         -
    ::aws_smithy_http_server::response::Response,
   31         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::ResponseRejection,
          30  +
    ::aws_smithy_legacy_http_server::response::Response,
          31  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::ResponseRejection,
   32     32   
> {
   33     33   
    Ok({
   34     34   
        #[allow(unused_mut)]
   35     35   
        let mut builder = ::http::Response::builder();
   36         -
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
          36  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   37     37   
            builder,
   38     38   
            ::http::header::CONTENT_TYPE,
   39     39   
            "application/x-amz-json-1.1",
   40     40   
        );
   41     41   
        let http_status: u16 = 200;
   42     42   
        builder = builder.status(http_status);
   43     43   
        let payload = "";
   44     44   
        let content_length = payload.len();
   45         -
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
          45  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   46     46   
            builder,
   47     47   
            ::http::header::CONTENT_LENGTH,
   48     48   
            content_length,
   49     49   
        );
   50         -
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
          50  +
        let body = ::aws_smithy_legacy_http_server::body::to_boxed(payload);
   51     51   
        builder.body(body)?
   52     52   
    })
   53     53   
}
   54     54   
   55     55   
#[allow(clippy::unnecessary_wraps)]
   56     56   
pub fn ser_endpoint_operation_http_error(
   57     57   
    error: &crate::error::EndpointOperationError,
   58     58   
) -> std::result::Result<
   59         -
    ::aws_smithy_http_server::response::Response,
   60         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::ResponseRejection,
          59  +
    ::aws_smithy_legacy_http_server::response::Response,
          60  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::ResponseRejection,
   61     61   
> {
   62     62   
    Ok({
   63     63   
        match error {
   64     64   
            crate::error::EndpointOperationError::InternalServerError(output) => {
   65     65   
                let payload = crate::protocol_serde::shape_internal_server_error::ser_internal_server_error_error(output)?;
   66     66   
                #[allow(unused_mut)]
   67     67   
                let mut builder = ::http::Response::builder();
   68         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          68  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   69     69   
                    builder,
   70     70   
                    ::http::header::CONTENT_TYPE,
   71     71   
                    "application/x-amz-json-1.1",
   72     72   
                );
   73     73   
                let content_length = payload.len();
   74         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          74  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   75     75   
                    builder,
   76     76   
                    ::http::header::CONTENT_LENGTH,
   77     77   
                    content_length,
   78     78   
                );
   79     79   
                builder
   80     80   
                    .status(500)
   81         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
          81  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
   82     82   
            }
   83     83   
        }
   84     84   
    })
   85     85   
}

tmp-codegen-diff/codegen-server-test-python/json_rpc11/rust-server-codegen-python/src/protocol_serde/shape_endpoint_with_host_label_operation.rs

@@ -1,1 +139,139 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
#[allow(clippy::unnecessary_wraps)]
    3      3   
pub async fn de_endpoint_with_host_label_operation_http_request<B>(
    4      4   
    #[allow(unused_variables)] request: ::http::Request<B>,
    5      5   
) -> std::result::Result<
    6      6   
    crate::input::EndpointWithHostLabelOperationInput,
    7         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection,
           7  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection,
    8      8   
>
    9      9   
where
   10         -
    B: ::aws_smithy_http_server::body::HttpBody + Send,
          10  +
    B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
   11     11   
    B::Data: Send,
   12         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection:
   13         -
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
          12  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection:
          13  +
        From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
   14     14   
{
   15     15   
    Ok({
   16     16   
        #[allow(unused_mut)]
   17     17   
        let mut input =
   18     18   
            crate::input::endpoint_with_host_label_operation_input_internal::Builder::default();
   19     19   
        #[allow(unused_variables)]
   20     20   
        let ::aws_smithy_runtime_api::http::RequestParts {
   21     21   
            uri, headers, body, ..
   22     22   
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
   23     23   
        let bytes = ::hyper::body::to_bytes(body).await?;
   24     24   
        if !bytes.is_empty() {
   25         -
            ::aws_smithy_http_server::protocol::content_type_header_classifier_smithy(
          25  +
            ::aws_smithy_legacy_http_server::protocol::content_type_header_classifier_smithy(
   26     26   
                &headers,
   27     27   
                Some("application/x-amz-json-1.1"),
   28     28   
            )?;
   29     29   
            input = crate::protocol_serde::shape_endpoint_with_host_label_operation::de_endpoint_with_host_label_operation(bytes.as_ref(), input)?;
   30     30   
        }
   31     31   
        input.build()?
   32     32   
    })
   33     33   
}
   34     34   
   35     35   
#[allow(clippy::unnecessary_wraps)]
   36     36   
pub fn ser_endpoint_with_host_label_operation_http_response(
   37     37   
    #[allow(unused_variables)] output: crate::output::EndpointWithHostLabelOperationOutput,
   38     38   
) -> std::result::Result<
   39         -
    ::aws_smithy_http_server::response::Response,
   40         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::ResponseRejection,
          39  +
    ::aws_smithy_legacy_http_server::response::Response,
          40  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::ResponseRejection,
   41     41   
> {
   42     42   
    Ok({
   43     43   
        #[allow(unused_mut)]
   44     44   
        let mut builder = ::http::Response::builder();
   45         -
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
          45  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   46     46   
            builder,
   47     47   
            ::http::header::CONTENT_TYPE,
   48     48   
            "application/x-amz-json-1.1",
   49     49   
        );
   50     50   
        let http_status: u16 = 200;
   51     51   
        builder = builder.status(http_status);
   52     52   
        let payload = "";
   53     53   
        let content_length = payload.len();
   54         -
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
          54  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   55     55   
            builder,
   56     56   
            ::http::header::CONTENT_LENGTH,
   57     57   
            content_length,
   58     58   
        );
   59         -
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
          59  +
        let body = ::aws_smithy_legacy_http_server::body::to_boxed(payload);
   60     60   
        builder.body(body)?
   61     61   
    })
   62     62   
}
   63     63   
   64     64   
#[allow(clippy::unnecessary_wraps)]
   65     65   
pub fn ser_endpoint_with_host_label_operation_http_error(
   66     66   
    error: &crate::error::EndpointWithHostLabelOperationError,
   67     67   
) -> std::result::Result<
   68         -
    ::aws_smithy_http_server::response::Response,
   69         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::ResponseRejection,
          68  +
    ::aws_smithy_legacy_http_server::response::Response,
          69  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::ResponseRejection,
   70     70   
> {
   71     71   
    Ok({
   72     72   
        match error {
   73     73   
            crate::error::EndpointWithHostLabelOperationError::ValidationException(output) => {
   74     74   
                let payload = crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(output)?;
   75     75   
                #[allow(unused_mut)]
   76     76   
                let mut builder = ::http::Response::builder();
   77         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          77  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   78     78   
                    builder,
   79     79   
                    ::http::header::CONTENT_TYPE,
   80     80   
                    "application/x-amz-json-1.1",
   81     81   
                );
   82     82   
                let content_length = payload.len();
   83         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          83  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   84     84   
                    builder,
   85     85   
                    ::http::header::CONTENT_LENGTH,
   86     86   
                    content_length,
   87     87   
                );
   88     88   
                builder
   89     89   
                    .status(400)
   90         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
          90  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
   91     91   
            }
   92     92   
            crate::error::EndpointWithHostLabelOperationError::InternalServerError(output) => {
   93     93   
                let payload = crate::protocol_serde::shape_internal_server_error::ser_internal_server_error_error(output)?;
   94     94   
                #[allow(unused_mut)]
   95     95   
                let mut builder = ::http::Response::builder();
   96         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          96  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   97     97   
                    builder,
   98     98   
                    ::http::header::CONTENT_TYPE,
   99     99   
                    "application/x-amz-json-1.1",
  100    100   
                );
  101    101   
                let content_length = payload.len();
  102         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         102  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  103    103   
                    builder,
  104    104   
                    ::http::header::CONTENT_LENGTH,
  105    105   
                    content_length,
  106    106   
                );
  107    107   
                builder
  108    108   
                    .status(500)
  109         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
         109  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
  110    110   
            }
  111    111   
        }
  112    112   
    })
  113    113   
}
  114    114   
  115    115   
pub(crate) fn de_endpoint_with_host_label_operation(
  116    116   
    value: &[u8],
  117    117   
    mut builder: crate::input::endpoint_with_host_label_operation_input_internal::Builder,
  118    118   
) -> ::std::result::Result<
  119    119   
    crate::input::endpoint_with_host_label_operation_input_internal::Builder,

tmp-codegen-diff/codegen-server-test-python/json_rpc11/rust-server-codegen-python/src/protocol_serde/shape_fractional_seconds.rs

@@ -1,1 +87,87 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
#[allow(clippy::unnecessary_wraps)]
    3      3   
pub async fn de_fractional_seconds_http_request<B>(
    4      4   
    #[allow(unused_variables)] request: ::http::Request<B>,
    5      5   
) -> std::result::Result<
    6      6   
    crate::input::FractionalSecondsInput,
    7         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection,
           7  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection,
    8      8   
>
    9      9   
where
   10         -
    B: ::aws_smithy_http_server::body::HttpBody + Send,
          10  +
    B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
   11     11   
    B::Data: Send,
   12         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection:
   13         -
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
          12  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection:
          13  +
        From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
   14     14   
{
   15     15   
    Ok({
   16     16   
        #[allow(unused_mut)]
   17     17   
        let mut input = crate::input::fractional_seconds_input_internal::Builder::default();
   18     18   
        #[allow(unused_variables)]
   19     19   
        let ::aws_smithy_runtime_api::http::RequestParts {
   20     20   
            uri, headers, body, ..
   21     21   
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
   22     22   
        input.build()
   23     23   
    })
   24     24   
}
   25     25   
   26     26   
#[allow(clippy::unnecessary_wraps)]
   27     27   
pub fn ser_fractional_seconds_http_response(
   28     28   
    #[allow(unused_variables)] output: crate::output::FractionalSecondsOutput,
   29     29   
) -> std::result::Result<
   30         -
    ::aws_smithy_http_server::response::Response,
   31         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::ResponseRejection,
          30  +
    ::aws_smithy_legacy_http_server::response::Response,
          31  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::ResponseRejection,
   32     32   
> {
   33     33   
    Ok({
   34     34   
        #[allow(unused_mut)]
   35     35   
        let mut builder = ::http::Response::builder();
   36         -
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
          36  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   37     37   
            builder,
   38     38   
            ::http::header::CONTENT_TYPE,
   39     39   
            "application/x-amz-json-1.1",
   40     40   
        );
   41     41   
        let http_status: u16 = 200;
   42     42   
        builder = builder.status(http_status);
   43     43   
        let payload =
   44     44   
            crate::protocol_serde::shape_fractional_seconds_output::ser_fractional_seconds_output_output_output(&output)?
   45     45   
        ;
   46     46   
        let content_length = payload.len();
   47         -
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
          47  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   48     48   
            builder,
   49     49   
            ::http::header::CONTENT_LENGTH,
   50     50   
            content_length,
   51     51   
        );
   52         -
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
          52  +
        let body = ::aws_smithy_legacy_http_server::body::to_boxed(payload);
   53     53   
        builder.body(body)?
   54     54   
    })
   55     55   
}
   56     56   
   57     57   
#[allow(clippy::unnecessary_wraps)]
   58     58   
pub fn ser_fractional_seconds_http_error(
   59     59   
    error: &crate::error::FractionalSecondsError,
   60     60   
) -> std::result::Result<
   61         -
    ::aws_smithy_http_server::response::Response,
   62         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::ResponseRejection,
          61  +
    ::aws_smithy_legacy_http_server::response::Response,
          62  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::ResponseRejection,
   63     63   
> {
   64     64   
    Ok({
   65     65   
        match error {
   66     66   
            crate::error::FractionalSecondsError::InternalServerError(output) => {
   67     67   
                let payload = crate::protocol_serde::shape_internal_server_error::ser_internal_server_error_error(output)?;
   68     68   
                #[allow(unused_mut)]
   69     69   
                let mut builder = ::http::Response::builder();
   70         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          70  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   71     71   
                    builder,
   72     72   
                    ::http::header::CONTENT_TYPE,
   73     73   
                    "application/x-amz-json-1.1",
   74     74   
                );
   75     75   
                let content_length = payload.len();
   76         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          76  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   77     77   
                    builder,
   78     78   
                    ::http::header::CONTENT_LENGTH,
   79     79   
                    content_length,
   80     80   
                );
   81     81   
                builder
   82     82   
                    .status(500)
   83         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
          83  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
   84     84   
            }
   85     85   
        }
   86     86   
    })
   87     87   
}

tmp-codegen-diff/codegen-server-test-python/json_rpc11/rust-server-codegen-python/src/protocol_serde/shape_greeting_with_errors.rs

@@ -1,1 +148,148 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
#[allow(clippy::unnecessary_wraps)]
    3      3   
pub async fn de_greeting_with_errors_http_request<B>(
    4      4   
    #[allow(unused_variables)] request: ::http::Request<B>,
    5      5   
) -> std::result::Result<
    6      6   
    crate::input::GreetingWithErrorsInput,
    7         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection,
           7  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection,
    8      8   
>
    9      9   
where
   10         -
    B: ::aws_smithy_http_server::body::HttpBody + Send,
          10  +
    B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
   11     11   
    B::Data: Send,
   12         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection:
   13         -
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
          12  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection:
          13  +
        From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
   14     14   
{
   15     15   
    Ok({
   16     16   
        #[allow(unused_mut)]
   17     17   
        let mut input = crate::input::greeting_with_errors_input_internal::Builder::default();
   18     18   
        #[allow(unused_variables)]
   19     19   
        let ::aws_smithy_runtime_api::http::RequestParts {
   20     20   
            uri, headers, body, ..
   21     21   
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
   22     22   
        input.build()
   23     23   
    })
   24     24   
}
   25     25   
   26     26   
#[allow(clippy::unnecessary_wraps)]
   27     27   
pub fn ser_greeting_with_errors_http_response(
   28     28   
    #[allow(unused_variables)] output: crate::output::GreetingWithErrorsOutput,
   29     29   
) -> std::result::Result<
   30         -
    ::aws_smithy_http_server::response::Response,
   31         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::ResponseRejection,
          30  +
    ::aws_smithy_legacy_http_server::response::Response,
          31  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::ResponseRejection,
   32     32   
> {
   33     33   
    Ok({
   34     34   
        #[allow(unused_mut)]
   35     35   
        let mut builder = ::http::Response::builder();
   36         -
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
          36  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   37     37   
            builder,
   38     38   
            ::http::header::CONTENT_TYPE,
   39     39   
            "application/x-amz-json-1.1",
   40     40   
        );
   41     41   
        let http_status: u16 = 200;
   42     42   
        builder = builder.status(http_status);
   43     43   
        let payload =
   44     44   
            crate::protocol_serde::shape_greeting_with_errors_output::ser_greeting_with_errors_output_output_output(&output)?
   45     45   
        ;
   46     46   
        let content_length = payload.len();
   47         -
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
          47  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   48     48   
            builder,
   49     49   
            ::http::header::CONTENT_LENGTH,
   50     50   
            content_length,
   51     51   
        );
   52         -
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
          52  +
        let body = ::aws_smithy_legacy_http_server::body::to_boxed(payload);
   53     53   
        builder.body(body)?
   54     54   
    })
   55     55   
}
   56     56   
   57     57   
#[allow(clippy::unnecessary_wraps)]
   58     58   
pub fn ser_greeting_with_errors_http_error(
   59     59   
    error: &crate::error::GreetingWithErrorsError,
   60     60   
) -> std::result::Result<
   61         -
    ::aws_smithy_http_server::response::Response,
   62         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::ResponseRejection,
          61  +
    ::aws_smithy_legacy_http_server::response::Response,
          62  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::ResponseRejection,
   63     63   
> {
   64     64   
    Ok({
   65     65   
        match error {
   66     66   
            crate::error::GreetingWithErrorsError::InvalidGreeting(output) => {
   67     67   
                let payload =
   68     68   
                    crate::protocol_serde::shape_invalid_greeting::ser_invalid_greeting_error(
   69     69   
                        output,
   70     70   
                    )?;
   71     71   
                #[allow(unused_mut)]
   72     72   
                let mut builder = ::http::Response::builder();
   73         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          73  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   74     74   
                    builder,
   75     75   
                    ::http::header::CONTENT_TYPE,
   76     76   
                    "application/x-amz-json-1.1",
   77     77   
                );
   78     78   
                let content_length = payload.len();
   79         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          79  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   80     80   
                    builder,
   81     81   
                    ::http::header::CONTENT_LENGTH,
   82     82   
                    content_length,
   83     83   
                );
   84     84   
                builder
   85     85   
                    .status(400)
   86         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
          86  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
   87     87   
            }
   88     88   
            crate::error::GreetingWithErrorsError::ComplexError(output) => {
   89     89   
                let payload =
   90     90   
                    crate::protocol_serde::shape_complex_error::ser_complex_error_error(output)?;
   91     91   
                #[allow(unused_mut)]
   92     92   
                let mut builder = ::http::Response::builder();
   93         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          93  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   94     94   
                    builder,
   95     95   
                    ::http::header::CONTENT_TYPE,
   96     96   
                    "application/x-amz-json-1.1",
   97     97   
                );
   98     98   
                let content_length = payload.len();
   99         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          99  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  100    100   
                    builder,
  101    101   
                    ::http::header::CONTENT_LENGTH,
  102    102   
                    content_length,
  103    103   
                );
  104    104   
                builder
  105    105   
                    .status(400)
  106         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
         106  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
  107    107   
            }
  108    108   
            crate::error::GreetingWithErrorsError::FooError(output) => {
  109    109   
                let payload = crate::protocol_serde::shape_foo_error::ser_foo_error_error(output)?;
  110    110   
                #[allow(unused_mut)]
  111    111   
                let mut builder = ::http::Response::builder();
  112         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         112  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  113    113   
                    builder,
  114    114   
                    ::http::header::CONTENT_TYPE,
  115    115   
                    "application/x-amz-json-1.1",
  116    116   
                );
  117    117   
                let content_length = payload.len();
  118         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         118  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  119    119   
                    builder,
  120    120   
                    ::http::header::CONTENT_LENGTH,
  121    121   
                    content_length,
  122    122   
                );
  123    123   
                builder
  124    124   
                    .status(500)
  125         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
         125  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
  126    126   
            }
  127    127   
            crate::error::GreetingWithErrorsError::InternalServerError(output) => {
  128    128   
                let payload = crate::protocol_serde::shape_internal_server_error::ser_internal_server_error_error(output)?;
  129    129   
                #[allow(unused_mut)]
  130    130   
                let mut builder = ::http::Response::builder();
  131         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         131  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  132    132   
                    builder,
  133    133   
                    ::http::header::CONTENT_TYPE,
  134    134   
                    "application/x-amz-json-1.1",
  135    135   
                );
  136    136   
                let content_length = payload.len();
  137         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         137  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  138    138   
                    builder,
  139    139   
                    ::http::header::CONTENT_LENGTH,
  140    140   
                    content_length,
  141    141   
                );
  142    142   
                builder
  143    143   
                    .status(500)
  144         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
         144  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
  145    145   
            }
  146    146   
        }
  147    147   
    })
  148    148   
}

tmp-codegen-diff/codegen-server-test-python/json_rpc11/rust-server-codegen-python/src/protocol_serde/shape_host_with_path_operation.rs

@@ -1,1 +85,85 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
#[allow(clippy::unnecessary_wraps)]
    3      3   
pub async fn de_host_with_path_operation_http_request<B>(
    4      4   
    #[allow(unused_variables)] request: ::http::Request<B>,
    5      5   
) -> std::result::Result<
    6      6   
    crate::input::HostWithPathOperationInput,
    7         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection,
           7  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection,
    8      8   
>
    9      9   
where
   10         -
    B: ::aws_smithy_http_server::body::HttpBody + Send,
          10  +
    B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
   11     11   
    B::Data: Send,
   12         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection:
   13         -
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
          12  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection:
          13  +
        From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
   14     14   
{
   15     15   
    Ok({
   16     16   
        #[allow(unused_mut)]
   17     17   
        let mut input = crate::input::host_with_path_operation_input_internal::Builder::default();
   18     18   
        #[allow(unused_variables)]
   19     19   
        let ::aws_smithy_runtime_api::http::RequestParts {
   20     20   
            uri, headers, body, ..
   21     21   
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
   22     22   
        input.build()
   23     23   
    })
   24     24   
}
   25     25   
   26     26   
#[allow(clippy::unnecessary_wraps)]
   27     27   
pub fn ser_host_with_path_operation_http_response(
   28     28   
    #[allow(unused_variables)] output: crate::output::HostWithPathOperationOutput,
   29     29   
) -> std::result::Result<
   30         -
    ::aws_smithy_http_server::response::Response,
   31         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::ResponseRejection,
          30  +
    ::aws_smithy_legacy_http_server::response::Response,
          31  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::ResponseRejection,
   32     32   
> {
   33     33   
    Ok({
   34     34   
        #[allow(unused_mut)]
   35     35   
        let mut builder = ::http::Response::builder();
   36         -
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
          36  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   37     37   
            builder,
   38     38   
            ::http::header::CONTENT_TYPE,
   39     39   
            "application/x-amz-json-1.1",
   40     40   
        );
   41     41   
        let http_status: u16 = 200;
   42     42   
        builder = builder.status(http_status);
   43     43   
        let payload = "";
   44     44   
        let content_length = payload.len();
   45         -
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
          45  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   46     46   
            builder,
   47     47   
            ::http::header::CONTENT_LENGTH,
   48     48   
            content_length,
   49     49   
        );
   50         -
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
          50  +
        let body = ::aws_smithy_legacy_http_server::body::to_boxed(payload);
   51     51   
        builder.body(body)?
   52     52   
    })
   53     53   
}
   54     54   
   55     55   
#[allow(clippy::unnecessary_wraps)]
   56     56   
pub fn ser_host_with_path_operation_http_error(
   57     57   
    error: &crate::error::HostWithPathOperationError,
   58     58   
) -> std::result::Result<
   59         -
    ::aws_smithy_http_server::response::Response,
   60         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::ResponseRejection,
          59  +
    ::aws_smithy_legacy_http_server::response::Response,
          60  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::ResponseRejection,
   61     61   
> {
   62     62   
    Ok({
   63     63   
        match error {
   64     64   
            crate::error::HostWithPathOperationError::InternalServerError(output) => {
   65     65   
                let payload = crate::protocol_serde::shape_internal_server_error::ser_internal_server_error_error(output)?;
   66     66   
                #[allow(unused_mut)]
   67     67   
                let mut builder = ::http::Response::builder();
   68         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          68  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   69     69   
                    builder,
   70     70   
                    ::http::header::CONTENT_TYPE,
   71     71   
                    "application/x-amz-json-1.1",
   72     72   
                );
   73     73   
                let content_length = payload.len();
   74         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          74  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   75     75   
                    builder,
   76     76   
                    ::http::header::CONTENT_LENGTH,
   77     77   
                    content_length,
   78     78   
                );
   79     79   
                builder
   80     80   
                    .status(500)
   81         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
          81  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
   82     82   
            }
   83     83   
        }
   84     84   
    })
   85     85   
}

tmp-codegen-diff/codegen-server-test-python/json_rpc11/rust-server-codegen-python/src/protocol_serde/shape_json_enums.rs

@@ -1,1 +141,141 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
#[allow(clippy::unnecessary_wraps)]
    3      3   
pub async fn de_json_enums_http_request<B>(
    4      4   
    #[allow(unused_variables)] request: ::http::Request<B>,
    5      5   
) -> std::result::Result<
    6      6   
    crate::input::JsonEnumsInput,
    7         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection,
           7  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection,
    8      8   
>
    9      9   
where
   10         -
    B: ::aws_smithy_http_server::body::HttpBody + Send,
          10  +
    B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
   11     11   
    B::Data: Send,
   12         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection:
   13         -
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
          12  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection:
          13  +
        From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
   14     14   
{
   15     15   
    Ok({
   16     16   
        #[allow(unused_mut)]
   17     17   
        let mut input = crate::input::json_enums_input_internal::Builder::default();
   18     18   
        #[allow(unused_variables)]
   19     19   
        let ::aws_smithy_runtime_api::http::RequestParts {
   20     20   
            uri, headers, body, ..
   21     21   
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
   22     22   
        let bytes = ::hyper::body::to_bytes(body).await?;
   23     23   
        if !bytes.is_empty() {
   24         -
            ::aws_smithy_http_server::protocol::content_type_header_classifier_smithy(
          24  +
            ::aws_smithy_legacy_http_server::protocol::content_type_header_classifier_smithy(
   25     25   
                &headers,
   26     26   
                Some("application/x-amz-json-1.1"),
   27     27   
            )?;
   28     28   
            input = crate::protocol_serde::shape_json_enums::de_json_enums(bytes.as_ref(), input)?;
   29     29   
        }
   30     30   
        input.build()?
   31     31   
    })
   32     32   
}
   33     33   
   34     34   
#[allow(clippy::unnecessary_wraps)]
   35     35   
pub fn ser_json_enums_http_response(
   36     36   
    #[allow(unused_variables)] output: crate::output::JsonEnumsOutput,
   37     37   
) -> std::result::Result<
   38         -
    ::aws_smithy_http_server::response::Response,
   39         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::ResponseRejection,
          38  +
    ::aws_smithy_legacy_http_server::response::Response,
          39  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::ResponseRejection,
   40     40   
> {
   41     41   
    Ok({
   42     42   
        #[allow(unused_mut)]
   43     43   
        let mut builder = ::http::Response::builder();
   44         -
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
          44  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   45     45   
            builder,
   46     46   
            ::http::header::CONTENT_TYPE,
   47     47   
            "application/x-amz-json-1.1",
   48     48   
        );
   49     49   
        let http_status: u16 = 200;
   50     50   
        builder = builder.status(http_status);
   51     51   
        let payload =
   52     52   
            crate::protocol_serde::shape_json_enums_output::ser_json_enums_output_output_output(
   53     53   
                &output,
   54     54   
            )?;
   55     55   
        let content_length = payload.len();
   56         -
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
          56  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   57     57   
            builder,
   58     58   
            ::http::header::CONTENT_LENGTH,
   59     59   
            content_length,
   60     60   
        );
   61         -
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
          61  +
        let body = ::aws_smithy_legacy_http_server::body::to_boxed(payload);
   62     62   
        builder.body(body)?
   63     63   
    })
   64     64   
}
   65     65   
   66     66   
#[allow(clippy::unnecessary_wraps)]
   67     67   
pub fn ser_json_enums_http_error(
   68     68   
    error: &crate::error::JsonEnumsError,
   69     69   
) -> std::result::Result<
   70         -
    ::aws_smithy_http_server::response::Response,
   71         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::ResponseRejection,
          70  +
    ::aws_smithy_legacy_http_server::response::Response,
          71  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::ResponseRejection,
   72     72   
> {
   73     73   
    Ok({
   74     74   
        match error {
   75     75   
            crate::error::JsonEnumsError::ValidationException(output) => {
   76     76   
                let payload = crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(output)?;
   77     77   
                #[allow(unused_mut)]
   78     78   
                let mut builder = ::http::Response::builder();
   79         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          79  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   80     80   
                    builder,
   81     81   
                    ::http::header::CONTENT_TYPE,
   82     82   
                    "application/x-amz-json-1.1",
   83     83   
                );
   84     84   
                let content_length = payload.len();
   85         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          85  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   86     86   
                    builder,
   87     87   
                    ::http::header::CONTENT_LENGTH,
   88     88   
                    content_length,
   89     89   
                );
   90     90   
                builder
   91     91   
                    .status(400)
   92         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
          92  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
   93     93   
            }
   94     94   
            crate::error::JsonEnumsError::InternalServerError(output) => {
   95     95   
                let payload = crate::protocol_serde::shape_internal_server_error::ser_internal_server_error_error(output)?;
   96     96   
                #[allow(unused_mut)]
   97     97   
                let mut builder = ::http::Response::builder();
   98         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          98  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   99     99   
                    builder,
  100    100   
                    ::http::header::CONTENT_TYPE,
  101    101   
                    "application/x-amz-json-1.1",
  102    102   
                );
  103    103   
                let content_length = payload.len();
  104         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         104  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  105    105   
                    builder,
  106    106   
                    ::http::header::CONTENT_LENGTH,
  107    107   
                    content_length,
  108    108   
                );
  109    109   
                builder
  110    110   
                    .status(500)
  111         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
         111  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
  112    112   
            }
  113    113   
        }
  114    114   
    })
  115    115   
}
  116    116   
  117    117   
pub(crate) fn de_json_enums(
  118    118   
    value: &[u8],
  119    119   
    mut builder: crate::input::json_enums_input_internal::Builder,
  120    120   
) -> ::std::result::Result<
  121    121   
    crate::input::json_enums_input_internal::Builder,

tmp-codegen-diff/codegen-server-test-python/json_rpc11/rust-server-codegen-python/src/protocol_serde/shape_json_int_enums.rs

@@ -1,1 +143,143 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
#[allow(clippy::unnecessary_wraps)]
    3      3   
pub async fn de_json_int_enums_http_request<B>(
    4      4   
    #[allow(unused_variables)] request: ::http::Request<B>,
    5      5   
) -> std::result::Result<
    6      6   
    crate::input::JsonIntEnumsInput,
    7         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection,
           7  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection,
    8      8   
>
    9      9   
where
   10         -
    B: ::aws_smithy_http_server::body::HttpBody + Send,
          10  +
    B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
   11     11   
    B::Data: Send,
   12         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection:
   13         -
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
          12  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection:
          13  +
        From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
   14     14   
{
   15     15   
    Ok({
   16     16   
        #[allow(unused_mut)]
   17     17   
        let mut input = crate::input::json_int_enums_input_internal::Builder::default();
   18     18   
        #[allow(unused_variables)]
   19     19   
        let ::aws_smithy_runtime_api::http::RequestParts {
   20     20   
            uri, headers, body, ..
   21     21   
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
   22     22   
        let bytes = ::hyper::body::to_bytes(body).await?;
   23     23   
        if !bytes.is_empty() {
   24         -
            ::aws_smithy_http_server::protocol::content_type_header_classifier_smithy(
          24  +
            ::aws_smithy_legacy_http_server::protocol::content_type_header_classifier_smithy(
   25     25   
                &headers,
   26     26   
                Some("application/x-amz-json-1.1"),
   27     27   
            )?;
   28     28   
            input = crate::protocol_serde::shape_json_int_enums::de_json_int_enums(
   29     29   
                bytes.as_ref(),
   30     30   
                input,
   31     31   
            )?;
   32     32   
        }
   33     33   
        input.build()?
   34     34   
    })
   35     35   
}
   36     36   
   37     37   
#[allow(clippy::unnecessary_wraps)]
   38     38   
pub fn ser_json_int_enums_http_response(
   39     39   
    #[allow(unused_variables)] output: crate::output::JsonIntEnumsOutput,
   40     40   
) -> std::result::Result<
   41         -
    ::aws_smithy_http_server::response::Response,
   42         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::ResponseRejection,
          41  +
    ::aws_smithy_legacy_http_server::response::Response,
          42  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::ResponseRejection,
   43     43   
> {
   44     44   
    Ok({
   45     45   
        #[allow(unused_mut)]
   46     46   
        let mut builder = ::http::Response::builder();
   47         -
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
          47  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   48     48   
            builder,
   49     49   
            ::http::header::CONTENT_TYPE,
   50     50   
            "application/x-amz-json-1.1",
   51     51   
        );
   52     52   
        let http_status: u16 = 200;
   53     53   
        builder = builder.status(http_status);
   54     54   
        let payload =
   55     55   
            crate::protocol_serde::shape_json_int_enums_output::ser_json_int_enums_output_output_output(&output)?
   56     56   
        ;
   57     57   
        let content_length = payload.len();
   58         -
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
          58  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   59     59   
            builder,
   60     60   
            ::http::header::CONTENT_LENGTH,
   61     61   
            content_length,
   62     62   
        );
   63         -
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
          63  +
        let body = ::aws_smithy_legacy_http_server::body::to_boxed(payload);
   64     64   
        builder.body(body)?
   65     65   
    })
   66     66   
}
   67     67   
   68     68   
#[allow(clippy::unnecessary_wraps)]
   69     69   
pub fn ser_json_int_enums_http_error(
   70     70   
    error: &crate::error::JsonIntEnumsError,
   71     71   
) -> std::result::Result<
   72         -
    ::aws_smithy_http_server::response::Response,
   73         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::ResponseRejection,
          72  +
    ::aws_smithy_legacy_http_server::response::Response,
          73  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::ResponseRejection,
   74     74   
> {
   75     75   
    Ok({
   76     76   
        match error {
   77     77   
            crate::error::JsonIntEnumsError::ValidationException(output) => {
   78     78   
                let payload = crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(output)?;
   79     79   
                #[allow(unused_mut)]
   80     80   
                let mut builder = ::http::Response::builder();
   81         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          81  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   82     82   
                    builder,
   83     83   
                    ::http::header::CONTENT_TYPE,
   84     84   
                    "application/x-amz-json-1.1",
   85     85   
                );
   86     86   
                let content_length = payload.len();
   87         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          87  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   88     88   
                    builder,
   89     89   
                    ::http::header::CONTENT_LENGTH,
   90     90   
                    content_length,
   91     91   
                );
   92     92   
                builder
   93     93   
                    .status(400)
   94         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
          94  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
   95     95   
            }
   96     96   
            crate::error::JsonIntEnumsError::InternalServerError(output) => {
   97     97   
                let payload = crate::protocol_serde::shape_internal_server_error::ser_internal_server_error_error(output)?;
   98     98   
                #[allow(unused_mut)]
   99     99   
                let mut builder = ::http::Response::builder();
  100         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         100  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  101    101   
                    builder,
  102    102   
                    ::http::header::CONTENT_TYPE,
  103    103   
                    "application/x-amz-json-1.1",
  104    104   
                );
  105    105   
                let content_length = payload.len();
  106         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         106  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  107    107   
                    builder,
  108    108   
                    ::http::header::CONTENT_LENGTH,
  109    109   
                    content_length,
  110    110   
                );
  111    111   
                builder
  112    112   
                    .status(500)
  113         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
         113  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
  114    114   
            }
  115    115   
        }
  116    116   
    })
  117    117   
}
  118    118   
  119    119   
pub(crate) fn de_json_int_enums(
  120    120   
    value: &[u8],
  121    121   
    mut builder: crate::input::json_int_enums_input_internal::Builder,
  122    122   
) -> ::std::result::Result<
  123    123   
    crate::input::json_int_enums_input_internal::Builder,

tmp-codegen-diff/codegen-server-test-python/json_rpc11/rust-server-codegen-python/src/protocol_serde/shape_json_unions.rs

@@ -1,1 +142,142 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
#[allow(clippy::unnecessary_wraps)]
    3      3   
pub async fn de_json_unions_http_request<B>(
    4      4   
    #[allow(unused_variables)] request: ::http::Request<B>,
    5      5   
) -> std::result::Result<
    6      6   
    crate::input::JsonUnionsInput,
    7         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection,
           7  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection,
    8      8   
>
    9      9   
where
   10         -
    B: ::aws_smithy_http_server::body::HttpBody + Send,
          10  +
    B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
   11     11   
    B::Data: Send,
   12         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection:
   13         -
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
          12  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection:
          13  +
        From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
   14     14   
{
   15     15   
    Ok({
   16     16   
        #[allow(unused_mut)]
   17     17   
        let mut input = crate::input::json_unions_input_internal::Builder::default();
   18     18   
        #[allow(unused_variables)]
   19     19   
        let ::aws_smithy_runtime_api::http::RequestParts {
   20     20   
            uri, headers, body, ..
   21     21   
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
   22     22   
        let bytes = ::hyper::body::to_bytes(body).await?;
   23     23   
        if !bytes.is_empty() {
   24         -
            ::aws_smithy_http_server::protocol::content_type_header_classifier_smithy(
          24  +
            ::aws_smithy_legacy_http_server::protocol::content_type_header_classifier_smithy(
   25     25   
                &headers,
   26     26   
                Some("application/x-amz-json-1.1"),
   27     27   
            )?;
   28     28   
            input =
   29     29   
                crate::protocol_serde::shape_json_unions::de_json_unions(bytes.as_ref(), input)?;
   30     30   
        }
   31     31   
        input.build()?
   32     32   
    })
   33     33   
}
   34     34   
   35     35   
#[allow(clippy::unnecessary_wraps)]
   36     36   
pub fn ser_json_unions_http_response(
   37     37   
    #[allow(unused_variables)] output: crate::output::JsonUnionsOutput,
   38     38   
) -> std::result::Result<
   39         -
    ::aws_smithy_http_server::response::Response,
   40         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::ResponseRejection,
          39  +
    ::aws_smithy_legacy_http_server::response::Response,
          40  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::ResponseRejection,
   41     41   
> {
   42     42   
    Ok({
   43     43   
        #[allow(unused_mut)]
   44     44   
        let mut builder = ::http::Response::builder();
   45         -
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
          45  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   46     46   
            builder,
   47     47   
            ::http::header::CONTENT_TYPE,
   48     48   
            "application/x-amz-json-1.1",
   49     49   
        );
   50     50   
        let http_status: u16 = 200;
   51     51   
        builder = builder.status(http_status);
   52     52   
        let payload =
   53     53   
            crate::protocol_serde::shape_json_unions_output::ser_json_unions_output_output_output(
   54     54   
                &output,
   55     55   
            )?;
   56     56   
        let content_length = payload.len();
   57         -
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
          57  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   58     58   
            builder,
   59     59   
            ::http::header::CONTENT_LENGTH,
   60     60   
            content_length,
   61     61   
        );
   62         -
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
          62  +
        let body = ::aws_smithy_legacy_http_server::body::to_boxed(payload);
   63     63   
        builder.body(body)?
   64     64   
    })
   65     65   
}
   66     66   
   67     67   
#[allow(clippy::unnecessary_wraps)]
   68     68   
pub fn ser_json_unions_http_error(
   69     69   
    error: &crate::error::JsonUnionsError,
   70     70   
) -> std::result::Result<
   71         -
    ::aws_smithy_http_server::response::Response,
   72         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::ResponseRejection,
          71  +
    ::aws_smithy_legacy_http_server::response::Response,
          72  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::ResponseRejection,
   73     73   
> {
   74     74   
    Ok({
   75     75   
        match error {
   76     76   
            crate::error::JsonUnionsError::ValidationException(output) => {
   77     77   
                let payload = crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(output)?;
   78     78   
                #[allow(unused_mut)]
   79     79   
                let mut builder = ::http::Response::builder();
   80         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          80  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   81     81   
                    builder,
   82     82   
                    ::http::header::CONTENT_TYPE,
   83     83   
                    "application/x-amz-json-1.1",
   84     84   
                );
   85     85   
                let content_length = payload.len();
   86         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          86  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   87     87   
                    builder,
   88     88   
                    ::http::header::CONTENT_LENGTH,
   89     89   
                    content_length,
   90     90   
                );
   91     91   
                builder
   92     92   
                    .status(400)
   93         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
          93  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
   94     94   
            }
   95     95   
            crate::error::JsonUnionsError::InternalServerError(output) => {
   96     96   
                let payload = crate::protocol_serde::shape_internal_server_error::ser_internal_server_error_error(output)?;
   97     97   
                #[allow(unused_mut)]
   98     98   
                let mut builder = ::http::Response::builder();
   99         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          99  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  100    100   
                    builder,
  101    101   
                    ::http::header::CONTENT_TYPE,
  102    102   
                    "application/x-amz-json-1.1",
  103    103   
                );
  104    104   
                let content_length = payload.len();
  105         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         105  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  106    106   
                    builder,
  107    107   
                    ::http::header::CONTENT_LENGTH,
  108    108   
                    content_length,
  109    109   
                );
  110    110   
                builder
  111    111   
                    .status(500)
  112         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
         112  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
  113    113   
            }
  114    114   
        }
  115    115   
    })
  116    116   
}
  117    117   
  118    118   
pub(crate) fn de_json_unions(
  119    119   
    value: &[u8],
  120    120   
    mut builder: crate::input::json_unions_input_internal::Builder,
  121    121   
) -> ::std::result::Result<
  122    122   
    crate::input::json_unions_input_internal::Builder,

tmp-codegen-diff/codegen-server-test-python/json_rpc11/rust-server-codegen-python/src/protocol_serde/shape_kitchen_sink_operation.rs

@@ -1,1 +165,165 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
#[allow(clippy::unnecessary_wraps)]
    3      3   
pub async fn de_kitchen_sink_operation_http_request<B>(
    4      4   
    #[allow(unused_variables)] request: ::http::Request<B>,
    5      5   
) -> std::result::Result<
    6      6   
    crate::input::KitchenSinkOperationInput,
    7         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection,
           7  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection,
    8      8   
>
    9      9   
where
   10         -
    B: ::aws_smithy_http_server::body::HttpBody + Send,
          10  +
    B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
   11     11   
    B::Data: Send,
   12         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection:
   13         -
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
          12  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection:
          13  +
        From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
   14     14   
{
   15     15   
    Ok({
   16     16   
        #[allow(unused_mut)]
   17     17   
        let mut input = crate::input::kitchen_sink_operation_input_internal::Builder::default();
   18     18   
        #[allow(unused_variables)]
   19     19   
        let ::aws_smithy_runtime_api::http::RequestParts {
   20     20   
            uri, headers, body, ..
   21     21   
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
   22     22   
        let bytes = ::hyper::body::to_bytes(body).await?;
   23     23   
        if !bytes.is_empty() {
   24         -
            ::aws_smithy_http_server::protocol::content_type_header_classifier_smithy(
          24  +
            ::aws_smithy_legacy_http_server::protocol::content_type_header_classifier_smithy(
   25     25   
                &headers,
   26     26   
                Some("application/x-amz-json-1.1"),
   27     27   
            )?;
   28     28   
            input = crate::protocol_serde::shape_kitchen_sink_operation::de_kitchen_sink_operation(
   29     29   
                bytes.as_ref(),
   30     30   
                input,
   31     31   
            )?;
   32     32   
        }
   33     33   
        input.build()
   34     34   
    })
   35     35   
}
   36     36   
   37     37   
#[allow(clippy::unnecessary_wraps)]
   38     38   
pub fn ser_kitchen_sink_operation_http_response(
   39     39   
    #[allow(unused_variables)] output: crate::output::KitchenSinkOperationOutput,
   40     40   
) -> std::result::Result<
   41         -
    ::aws_smithy_http_server::response::Response,
   42         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::ResponseRejection,
          41  +
    ::aws_smithy_legacy_http_server::response::Response,
          42  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::ResponseRejection,
   43     43   
> {
   44     44   
    Ok({
   45     45   
        #[allow(unused_mut)]
   46     46   
        let mut builder = ::http::Response::builder();
   47         -
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
          47  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   48     48   
            builder,
   49     49   
            ::http::header::CONTENT_TYPE,
   50     50   
            "application/x-amz-json-1.1",
   51     51   
        );
   52     52   
        let http_status: u16 = 200;
   53     53   
        builder = builder.status(http_status);
   54     54   
        let payload =
   55     55   
            crate::protocol_serde::shape_kitchen_sink_operation_output::ser_kitchen_sink_operation_output_output_output(&output)?
   56     56   
        ;
   57     57   
        let content_length = payload.len();
   58         -
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
          58  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   59     59   
            builder,
   60     60   
            ::http::header::CONTENT_LENGTH,
   61     61   
            content_length,
   62     62   
        );
   63         -
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
          63  +
        let body = ::aws_smithy_legacy_http_server::body::to_boxed(payload);
   64     64   
        builder.body(body)?
   65     65   
    })
   66     66   
}
   67     67   
   68     68   
#[allow(clippy::unnecessary_wraps)]
   69     69   
pub fn ser_kitchen_sink_operation_http_error(
   70     70   
    error: &crate::error::KitchenSinkOperationError,
   71     71   
) -> std::result::Result<
   72         -
    ::aws_smithy_http_server::response::Response,
   73         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::ResponseRejection,
          72  +
    ::aws_smithy_legacy_http_server::response::Response,
          73  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::ResponseRejection,
   74     74   
> {
   75     75   
    Ok({
   76     76   
        match error {
   77     77   
            crate::error::KitchenSinkOperationError::ErrorWithMembers(output) => {
   78     78   
                let payload =
   79     79   
                    crate::protocol_serde::shape_error_with_members::ser_error_with_members_error(
   80     80   
                        output,
   81     81   
                    )?;
   82     82   
                #[allow(unused_mut)]
   83     83   
                let mut builder = ::http::Response::builder();
   84         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          84  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   85     85   
                    builder,
   86     86   
                    ::http::header::CONTENT_TYPE,
   87     87   
                    "application/x-amz-json-1.1",
   88     88   
                );
   89     89   
                let content_length = payload.len();
   90         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          90  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   91     91   
                    builder,
   92     92   
                    ::http::header::CONTENT_LENGTH,
   93     93   
                    content_length,
   94     94   
                );
   95     95   
                builder
   96     96   
                    .status(400)
   97         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
          97  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
   98     98   
            }
   99     99   
            crate::error::KitchenSinkOperationError::ErrorWithoutMembers(output) => {
  100    100   
                let payload = crate::protocol_serde::shape_error_without_members::ser_error_without_members_error(output)?;
  101    101   
                #[allow(unused_mut)]
  102    102   
                let mut builder = ::http::Response::builder();
  103         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         103  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  104    104   
                    builder,
  105    105   
                    ::http::header::CONTENT_TYPE,
  106    106   
                    "application/x-amz-json-1.1",
  107    107   
                );
  108    108   
                let content_length = payload.len();
  109         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         109  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  110    110   
                    builder,
  111    111   
                    ::http::header::CONTENT_LENGTH,
  112    112   
                    content_length,
  113    113   
                );
  114    114   
                builder
  115    115   
                    .status(500)
  116         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
         116  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
  117    117   
            }
  118    118   
            crate::error::KitchenSinkOperationError::InternalServerError(output) => {
  119    119   
                let payload = crate::protocol_serde::shape_internal_server_error::ser_internal_server_error_error(output)?;
  120    120   
                #[allow(unused_mut)]
  121    121   
                let mut builder = ::http::Response::builder();
  122         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         122  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  123    123   
                    builder,
  124    124   
                    ::http::header::CONTENT_TYPE,
  125    125   
                    "application/x-amz-json-1.1",
  126    126   
                );
  127    127   
                let content_length = payload.len();
  128         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         128  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  129    129   
                    builder,
  130    130   
                    ::http::header::CONTENT_LENGTH,
  131    131   
                    content_length,
  132    132   
                );
  133    133   
                builder
  134    134   
                    .status(500)
  135         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
         135  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
  136    136   
            }
  137    137   
        }
  138    138   
    })
  139    139   
}
  140    140   
  141    141   
pub(crate) fn de_kitchen_sink_operation(
  142    142   
    value: &[u8],
  143    143   
    mut builder: crate::input::kitchen_sink_operation_input_internal::Builder,
  144    144   
) -> ::std::result::Result<
  145    145   
    crate::input::kitchen_sink_operation_input_internal::Builder,

tmp-codegen-diff/codegen-server-test-python/json_rpc11/rust-server-codegen-python/src/protocol_serde/shape_null_operation.rs

@@ -1,1 +124,124 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
#[allow(clippy::unnecessary_wraps)]
    3      3   
pub async fn de_null_operation_http_request<B>(
    4      4   
    #[allow(unused_variables)] request: ::http::Request<B>,
    5      5   
) -> std::result::Result<
    6      6   
    crate::input::NullOperationInput,
    7         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection,
           7  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection,
    8      8   
>
    9      9   
where
   10         -
    B: ::aws_smithy_http_server::body::HttpBody + Send,
          10  +
    B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
   11     11   
    B::Data: Send,
   12         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection:
   13         -
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
          12  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection:
          13  +
        From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
   14     14   
{
   15     15   
    Ok({
   16     16   
        #[allow(unused_mut)]
   17     17   
        let mut input = crate::input::null_operation_input_internal::Builder::default();
   18     18   
        #[allow(unused_variables)]
   19     19   
        let ::aws_smithy_runtime_api::http::RequestParts {
   20     20   
            uri, headers, body, ..
   21     21   
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
   22     22   
        let bytes = ::hyper::body::to_bytes(body).await?;
   23     23   
        if !bytes.is_empty() {
   24         -
            ::aws_smithy_http_server::protocol::content_type_header_classifier_smithy(
          24  +
            ::aws_smithy_legacy_http_server::protocol::content_type_header_classifier_smithy(
   25     25   
                &headers,
   26     26   
                Some("application/x-amz-json-1.1"),
   27     27   
            )?;
   28     28   
            input = crate::protocol_serde::shape_null_operation::de_null_operation(
   29     29   
                bytes.as_ref(),
   30     30   
                input,
   31     31   
            )?;
   32     32   
        }
   33     33   
        input.build()
   34     34   
    })
   35     35   
}
   36     36   
   37     37   
#[allow(clippy::unnecessary_wraps)]
   38     38   
pub fn ser_null_operation_http_response(
   39     39   
    #[allow(unused_variables)] output: crate::output::NullOperationOutput,
   40     40   
) -> std::result::Result<
   41         -
    ::aws_smithy_http_server::response::Response,
   42         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::ResponseRejection,
          41  +
    ::aws_smithy_legacy_http_server::response::Response,
          42  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::ResponseRejection,
   43     43   
> {
   44     44   
    Ok({
   45     45   
        #[allow(unused_mut)]
   46     46   
        let mut builder = ::http::Response::builder();
   47         -
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
          47  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   48     48   
            builder,
   49     49   
            ::http::header::CONTENT_TYPE,
   50     50   
            "application/x-amz-json-1.1",
   51     51   
        );
   52     52   
        let http_status: u16 = 200;
   53     53   
        builder = builder.status(http_status);
   54     54   
        let payload =
   55     55   
            crate::protocol_serde::shape_null_operation_output::ser_null_operation_output_output_output(&output)?
   56     56   
        ;
   57     57   
        let content_length = payload.len();
   58         -
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
          58  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   59     59   
            builder,
   60     60   
            ::http::header::CONTENT_LENGTH,
   61     61   
            content_length,
   62     62   
        );
   63         -
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
          63  +
        let body = ::aws_smithy_legacy_http_server::body::to_boxed(payload);
   64     64   
        builder.body(body)?
   65     65   
    })
   66     66   
}
   67     67   
   68     68   
#[allow(clippy::unnecessary_wraps)]
   69     69   
pub fn ser_null_operation_http_error(
   70     70   
    error: &crate::error::NullOperationError,
   71     71   
) -> std::result::Result<
   72         -
    ::aws_smithy_http_server::response::Response,
   73         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::ResponseRejection,
          72  +
    ::aws_smithy_legacy_http_server::response::Response,
          73  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::ResponseRejection,
   74     74   
> {
   75     75   
    Ok({
   76     76   
        match error {
   77     77   
            crate::error::NullOperationError::InternalServerError(output) => {
   78     78   
                let payload = crate::protocol_serde::shape_internal_server_error::ser_internal_server_error_error(output)?;
   79     79   
                #[allow(unused_mut)]
   80     80   
                let mut builder = ::http::Response::builder();
   81         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          81  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   82     82   
                    builder,
   83     83   
                    ::http::header::CONTENT_TYPE,
   84     84   
                    "application/x-amz-json-1.1",
   85     85   
                );
   86     86   
                let content_length = payload.len();
   87         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          87  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   88     88   
                    builder,
   89     89   
                    ::http::header::CONTENT_LENGTH,
   90     90   
                    content_length,
   91     91   
                );
   92     92   
                builder
   93     93   
                    .status(500)
   94         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
          94  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
   95     95   
            }
   96     96   
        }
   97     97   
    })
   98     98   
}
   99     99   
  100    100   
pub(crate) fn de_null_operation(
  101    101   
    value: &[u8],
  102    102   
    mut builder: crate::input::null_operation_input_internal::Builder,
  103    103   
) -> ::std::result::Result<
  104    104   
    crate::input::null_operation_input_internal::Builder,

tmp-codegen-diff/codegen-server-test-python/json_rpc11/rust-server-codegen-python/src/protocol_serde/shape_operation_with_optional_input_output.rs

@@ -1,1 +122,122 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
#[allow(clippy::unnecessary_wraps)]
    3      3   
pub async fn de_operation_with_optional_input_output_http_request<B>(
    4      4   
    #[allow(unused_variables)] request: ::http::Request<B>,
    5      5   
) -> std::result::Result<
    6      6   
    crate::input::OperationWithOptionalInputOutputInput,
    7         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection,
           7  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection,
    8      8   
>
    9      9   
where
   10         -
    B: ::aws_smithy_http_server::body::HttpBody + Send,
          10  +
    B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
   11     11   
    B::Data: Send,
   12         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection:
   13         -
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
          12  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection:
          13  +
        From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
   14     14   
{
   15     15   
    Ok({
   16     16   
        #[allow(unused_mut)]
   17     17   
        let mut input =
   18     18   
            crate::input::operation_with_optional_input_output_input_internal::Builder::default();
   19     19   
        #[allow(unused_variables)]
   20     20   
        let ::aws_smithy_runtime_api::http::RequestParts {
   21     21   
            uri, headers, body, ..
   22     22   
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
   23     23   
        let bytes = ::hyper::body::to_bytes(body).await?;
   24     24   
        if !bytes.is_empty() {
   25         -
            ::aws_smithy_http_server::protocol::content_type_header_classifier_smithy(
          25  +
            ::aws_smithy_legacy_http_server::protocol::content_type_header_classifier_smithy(
   26     26   
                &headers,
   27     27   
                Some("application/x-amz-json-1.1"),
   28     28   
            )?;
   29     29   
            input = crate::protocol_serde::shape_operation_with_optional_input_output::de_operation_with_optional_input_output(bytes.as_ref(), input)?;
   30     30   
        }
   31     31   
        input.build()
   32     32   
    })
   33     33   
}
   34     34   
   35     35   
#[allow(clippy::unnecessary_wraps)]
   36     36   
pub fn ser_operation_with_optional_input_output_http_response(
   37     37   
    #[allow(unused_variables)] output: crate::output::OperationWithOptionalInputOutputOutput,
   38     38   
) -> std::result::Result<
   39         -
    ::aws_smithy_http_server::response::Response,
   40         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::ResponseRejection,
          39  +
    ::aws_smithy_legacy_http_server::response::Response,
          40  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::ResponseRejection,
   41     41   
> {
   42     42   
    Ok({
   43     43   
        #[allow(unused_mut)]
   44     44   
        let mut builder = ::http::Response::builder();
   45         -
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
          45  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   46     46   
            builder,
   47     47   
            ::http::header::CONTENT_TYPE,
   48     48   
            "application/x-amz-json-1.1",
   49     49   
        );
   50     50   
        let http_status: u16 = 200;
   51     51   
        builder = builder.status(http_status);
   52     52   
        let payload =
   53     53   
            crate::protocol_serde::shape_operation_with_optional_input_output_output::ser_operation_with_optional_input_output_output_output_output(&output)?
   54     54   
        ;
   55     55   
        let content_length = payload.len();
   56         -
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
          56  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   57     57   
            builder,
   58     58   
            ::http::header::CONTENT_LENGTH,
   59     59   
            content_length,
   60     60   
        );
   61         -
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
          61  +
        let body = ::aws_smithy_legacy_http_server::body::to_boxed(payload);
   62     62   
        builder.body(body)?
   63     63   
    })
   64     64   
}
   65     65   
   66     66   
#[allow(clippy::unnecessary_wraps)]
   67     67   
pub fn ser_operation_with_optional_input_output_http_error(
   68     68   
    error: &crate::error::OperationWithOptionalInputOutputError,
   69     69   
) -> std::result::Result<
   70         -
    ::aws_smithy_http_server::response::Response,
   71         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::ResponseRejection,
          70  +
    ::aws_smithy_legacy_http_server::response::Response,
          71  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::ResponseRejection,
   72     72   
> {
   73     73   
    Ok({
   74     74   
        match error {
   75     75   
            crate::error::OperationWithOptionalInputOutputError::InternalServerError(output) => {
   76     76   
                let payload = crate::protocol_serde::shape_internal_server_error::ser_internal_server_error_error(output)?;
   77     77   
                #[allow(unused_mut)]
   78     78   
                let mut builder = ::http::Response::builder();
   79         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          79  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   80     80   
                    builder,
   81     81   
                    ::http::header::CONTENT_TYPE,
   82     82   
                    "application/x-amz-json-1.1",
   83     83   
                );
   84     84   
                let content_length = payload.len();
   85         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          85  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   86     86   
                    builder,
   87     87   
                    ::http::header::CONTENT_LENGTH,
   88     88   
                    content_length,
   89     89   
                );
   90     90   
                builder
   91     91   
                    .status(500)
   92         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
          92  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
   93     93   
            }
   94     94   
        }
   95     95   
    })
   96     96   
}
   97     97   
   98     98   
pub(crate) fn de_operation_with_optional_input_output(
   99     99   
    value: &[u8],
  100    100   
    mut builder: crate::input::operation_with_optional_input_output_input_internal::Builder,
  101    101   
) -> ::std::result::Result<
  102    102   
    crate::input::operation_with_optional_input_output_input_internal::Builder,

tmp-codegen-diff/codegen-server-test-python/json_rpc11/rust-server-codegen-python/src/protocol_serde/shape_put_and_get_inline_documents.rs

@@ -1,1 +122,122 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
#[allow(clippy::unnecessary_wraps)]
    3      3   
pub async fn de_put_and_get_inline_documents_http_request<B>(
    4      4   
    #[allow(unused_variables)] request: ::http::Request<B>,
    5      5   
) -> std::result::Result<
    6      6   
    crate::input::PutAndGetInlineDocumentsInput,
    7         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection,
           7  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection,
    8      8   
>
    9      9   
where
   10         -
    B: ::aws_smithy_http_server::body::HttpBody + Send,
          10  +
    B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
   11     11   
    B::Data: Send,
   12         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection:
   13         -
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
          12  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection:
          13  +
        From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
   14     14   
{
   15     15   
    Ok({
   16     16   
        #[allow(unused_mut)]
   17     17   
        let mut input =
   18     18   
            crate::input::put_and_get_inline_documents_input_internal::Builder::default();
   19     19   
        #[allow(unused_variables)]
   20     20   
        let ::aws_smithy_runtime_api::http::RequestParts {
   21     21   
            uri, headers, body, ..
   22     22   
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
   23     23   
        let bytes = ::hyper::body::to_bytes(body).await?;
   24     24   
        if !bytes.is_empty() {
   25         -
            ::aws_smithy_http_server::protocol::content_type_header_classifier_smithy(
          25  +
            ::aws_smithy_legacy_http_server::protocol::content_type_header_classifier_smithy(
   26     26   
                &headers,
   27     27   
                Some("application/x-amz-json-1.1"),
   28     28   
            )?;
   29     29   
            input = crate::protocol_serde::shape_put_and_get_inline_documents::de_put_and_get_inline_documents(bytes.as_ref(), input)?;
   30     30   
        }
   31     31   
        input.build()
   32     32   
    })
   33     33   
}
   34     34   
   35     35   
#[allow(clippy::unnecessary_wraps)]
   36     36   
pub fn ser_put_and_get_inline_documents_http_response(
   37     37   
    #[allow(unused_variables)] output: crate::output::PutAndGetInlineDocumentsOutput,
   38     38   
) -> std::result::Result<
   39         -
    ::aws_smithy_http_server::response::Response,
   40         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::ResponseRejection,
          39  +
    ::aws_smithy_legacy_http_server::response::Response,
          40  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::ResponseRejection,
   41     41   
> {
   42     42   
    Ok({
   43     43   
        #[allow(unused_mut)]
   44     44   
        let mut builder = ::http::Response::builder();
   45         -
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
          45  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   46     46   
            builder,
   47     47   
            ::http::header::CONTENT_TYPE,
   48     48   
            "application/x-amz-json-1.1",
   49     49   
        );
   50     50   
        let http_status: u16 = 200;
   51     51   
        builder = builder.status(http_status);
   52     52   
        let payload =
   53     53   
            crate::protocol_serde::shape_put_and_get_inline_documents_output::ser_put_and_get_inline_documents_output_output_output(&output)?
   54     54   
        ;
   55     55   
        let content_length = payload.len();
   56         -
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
          56  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   57     57   
            builder,
   58     58   
            ::http::header::CONTENT_LENGTH,
   59     59   
            content_length,
   60     60   
        );
   61         -
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
          61  +
        let body = ::aws_smithy_legacy_http_server::body::to_boxed(payload);
   62     62   
        builder.body(body)?
   63     63   
    })
   64     64   
}
   65     65   
   66     66   
#[allow(clippy::unnecessary_wraps)]
   67     67   
pub fn ser_put_and_get_inline_documents_http_error(
   68     68   
    error: &crate::error::PutAndGetInlineDocumentsError,
   69     69   
) -> std::result::Result<
   70         -
    ::aws_smithy_http_server::response::Response,
   71         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::ResponseRejection,
          70  +
    ::aws_smithy_legacy_http_server::response::Response,
          71  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::ResponseRejection,
   72     72   
> {
   73     73   
    Ok({
   74     74   
        match error {
   75     75   
            crate::error::PutAndGetInlineDocumentsError::InternalServerError(output) => {
   76     76   
                let payload = crate::protocol_serde::shape_internal_server_error::ser_internal_server_error_error(output)?;
   77     77   
                #[allow(unused_mut)]
   78     78   
                let mut builder = ::http::Response::builder();
   79         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          79  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   80     80   
                    builder,
   81     81   
                    ::http::header::CONTENT_TYPE,
   82     82   
                    "application/x-amz-json-1.1",
   83     83   
                );
   84     84   
                let content_length = payload.len();
   85         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          85  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   86     86   
                    builder,
   87     87   
                    ::http::header::CONTENT_LENGTH,
   88     88   
                    content_length,
   89     89   
                );
   90     90   
                builder
   91     91   
                    .status(500)
   92         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
          92  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
   93     93   
            }
   94     94   
        }
   95     95   
    })
   96     96   
}
   97     97   
   98     98   
pub(crate) fn de_put_and_get_inline_documents(
   99     99   
    value: &[u8],
  100    100   
    mut builder: crate::input::put_and_get_inline_documents_input_internal::Builder,
  101    101   
) -> ::std::result::Result<
  102    102   
    crate::input::put_and_get_inline_documents_input_internal::Builder,