Server Test

Server Test

rev. 8d0b0b06b5c6b3538919ea3b54d9ba4784f2f355

Files changed:

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

@@ -1,1 +22,22 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
/* HttpBoundProtocolPayloadGenerator.kt:309 */
           2  +
/* HttpBoundProtocolPayloadGenerator.kt:314 */
    3      3   
pub fn ser_data_http_payload(
    4      4   
    payload: ::std::option::Option<::aws_smithy_types::Blob>,
    5      5   
) -> ::std::result::Result<::std::vec::Vec<u8>, ::aws_smithy_types::error::operation::BuildError> {
    6         -
    /* HttpBoundProtocolPayloadGenerator.kt:318 */
           6  +
    /* HttpBoundProtocolPayloadGenerator.kt:323 */
    7      7   
    let payload = match payload {
    8      8   
        Some(t) => t,
    9      9   
        None => {
   10     10   
            return Ok(
   11         -
                /* HttpBoundProtocolPayloadGenerator.kt:330 */
   12         -
                Vec::new(), /* HttpBoundProtocolPayloadGenerator.kt:318 */
          11  +
                /* HttpBoundProtocolPayloadGenerator.kt:335 */
          12  +
                Vec::new(), /* HttpBoundProtocolPayloadGenerator.kt:323 */
   13     13   
            )
   14     14   
        }
   15     15   
    };
   16         -
    /* HttpBoundProtocolPayloadGenerator.kt:343 */
          16  +
    /* HttpBoundProtocolPayloadGenerator.kt:348 */
   17     17   
    Ok(
   18         -
        /* HttpBoundProtocolPayloadGenerator.kt:375 */
   19         -
        payload.into_inner(), /* HttpBoundProtocolPayloadGenerator.kt:343 */
          18  +
        /* HttpBoundProtocolPayloadGenerator.kt:380 */
          19  +
        payload.into_inner(), /* HttpBoundProtocolPayloadGenerator.kt:348 */
   20     20   
    )
   21         -
    /* HttpBoundProtocolPayloadGenerator.kt:309 */
          21  +
    /* HttpBoundProtocolPayloadGenerator.kt:314 */
   22     22   
}

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

@@ -55,55 +115,115 @@
   75     75   
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   76     76   
            builder,
   77     77   
            ::http::header::CONTENT_TYPE,
   78     78   
            "application/json",
   79     79   
        );
   80     80   
        /* ServerHttpBoundProtocolGenerator.kt:732 */
   81     81   
        let http_status: u16 = 200;
   82     82   
        builder = builder.status(http_status);
   83     83   
        /* ServerHttpBoundProtocolGenerator.kt:611 */
   84     84   
        let payload =
   85         -
            /* HttpBoundProtocolPayloadGenerator.kt:348 */crate::protocol_serde::shape_test_payload_structure_output::ser_payload_config_http_payload(& output.payload_config)?
          85  +
            /* HttpBoundProtocolPayloadGenerator.kt:353 */crate::protocol_serde::shape_test_payload_structure_output::ser_payload_config_http_payload(& output.payload_config)?
   86     86   
        /* ServerHttpBoundProtocolGenerator.kt:611 */;
   87     87   
        /* ServerHttpBoundProtocolGenerator.kt:713 */
   88     88   
        let content_length = payload.len();
   89     89   
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   90     90   
            builder,
   91     91   
            ::http::header::CONTENT_LENGTH,
   92     92   
            content_length,
   93     93   
        );
   94     94   
        /* ServerHttpBoundProtocolGenerator.kt:617 */
   95     95   
        let body = ::aws_smithy_legacy_http_server::body::to_boxed(payload);

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

@@ -1,1 +44,44 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
/* HttpBoundProtocolPayloadGenerator.kt:309 */
           2  +
/* HttpBoundProtocolPayloadGenerator.kt:314 */
    3      3   
pub fn ser_payload_config_http_payload(
    4      4   
    payload: &::std::option::Option<crate::model::PayloadConfig>,
    5      5   
) -> ::std::result::Result<::std::vec::Vec<u8>, ::aws_smithy_types::error::operation::BuildError> {
    6         -
    /* HttpBoundProtocolPayloadGenerator.kt:318 */
           6  +
    /* HttpBoundProtocolPayloadGenerator.kt:323 */
    7      7   
    let payload = match payload.as_ref() {
    8      8   
        Some(t) => t,
    9      9   
        None => {
   10     10   
            return Ok(
   11         -
                /* HttpBoundProtocolPayloadGenerator.kt:336 */
   12         -
                crate::protocol_serde::rest_json_unset_struct_payload(), /* HttpBoundProtocolPayloadGenerator.kt:318 */
          11  +
                /* HttpBoundProtocolPayloadGenerator.kt:341 */
          12  +
                crate::protocol_serde::rest_json_unset_struct_payload(), /* HttpBoundProtocolPayloadGenerator.kt:323 */
   13     13   
            )
   14     14   
        }
   15     15   
    };
   16         -
    /* HttpBoundProtocolPayloadGenerator.kt:343 */
          16  +
    /* HttpBoundProtocolPayloadGenerator.kt:348 */
   17     17   
    Ok(
   18         -
        /* HttpBoundProtocolPayloadGenerator.kt:384 */
          18  +
        /* HttpBoundProtocolPayloadGenerator.kt:389 */
   19     19   
        crate::protocol_serde::shape_test_payload_structure_output::ser_payload_config_payload(
   20     20   
            payload,
   21         -
        )?, /* HttpBoundProtocolPayloadGenerator.kt:343 */
          21  +
        )?, /* HttpBoundProtocolPayloadGenerator.kt:348 */
   22     22   
    )
   23         -
    /* HttpBoundProtocolPayloadGenerator.kt:309 */
          23  +
    /* HttpBoundProtocolPayloadGenerator.kt:314 */
   24     24   
}
   25     25   
   26     26   
/* JsonSerializerGenerator.kt:242 */
   27     27   
pub fn ser_payload_config_payload(
   28     28   
    input: &crate::model::PayloadConfig,
   29     29   
) -> std::result::Result<
   30     30   
    ::std::vec::Vec<u8>,
   31     31   
    ::aws_smithy_types::error::operation::SerializationError,
   32     32   
> {
   33     33   
    /* JsonSerializerGenerator.kt:247 */

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

@@ -38,38 +98,98 @@
   58     58   
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   59     59   
            builder,
   60     60   
            ::http::header::CONTENT_TYPE,
   61     61   
            "application/json",
   62     62   
        );
   63     63   
        /* ServerHttpBoundProtocolGenerator.kt:732 */
   64     64   
        let http_status: u16 = 200;
   65     65   
        builder = builder.status(http_status);
   66     66   
        /* ServerHttpBoundProtocolGenerator.kt:611 */
   67     67   
        let payload =
   68         -
            /* HttpBoundProtocolPayloadGenerator.kt:235 */crate::protocol_serde::shape_test_post_no_input_no_payload_output::ser_test_post_no_input_no_payload_output_output_output(&output)?
          68  +
            /* HttpBoundProtocolPayloadGenerator.kt:240 */crate::protocol_serde::shape_test_post_no_input_no_payload_output::ser_test_post_no_input_no_payload_output_output_output(&output)?
   69     69   
        /* ServerHttpBoundProtocolGenerator.kt:611 */;
   70     70   
        /* ServerHttpBoundProtocolGenerator.kt:713 */
   71     71   
        let content_length = payload.len();
   72     72   
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   73     73   
            builder,
   74     74   
            ::http::header::CONTENT_LENGTH,
   75     75   
            content_length,
   76     76   
        );
   77     77   
        /* ServerHttpBoundProtocolGenerator.kt:617 */
   78     78   
        let body = ::aws_smithy_legacy_http_server::body::to_boxed(payload);

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

@@ -43,43 +103,103 @@
   63     63   
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   64     64   
            builder,
   65     65   
            ::http::header::CONTENT_TYPE,
   66     66   
            "application/json",
   67     67   
        );
   68     68   
        /* ServerHttpBoundProtocolGenerator.kt:732 */
   69     69   
        let http_status: u16 = 200;
   70     70   
        builder = builder.status(http_status);
   71     71   
        /* ServerHttpBoundProtocolGenerator.kt:611 */
   72     72   
        let payload =
   73         -
            /* HttpBoundProtocolPayloadGenerator.kt:235 */crate::protocol_serde::shape_test_post_no_payload_output::ser_test_post_no_payload_output_output_output(&output)?
          73  +
            /* HttpBoundProtocolPayloadGenerator.kt:240 */crate::protocol_serde::shape_test_post_no_payload_output::ser_test_post_no_payload_output_output_output(&output)?
   74     74   
        /* ServerHttpBoundProtocolGenerator.kt:611 */;
   75     75   
        /* ServerHttpBoundProtocolGenerator.kt:713 */
   76     76   
        let content_length = payload.len();
   77     77   
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   78     78   
            builder,
   79     79   
            ::http::header::CONTENT_LENGTH,
   80     80   
            content_length,
   81     81   
        );
   82     82   
        /* ServerHttpBoundProtocolGenerator.kt:617 */
   83     83   
        let body = ::aws_smithy_legacy_http_server::body::to_boxed(payload);

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

@@ -82,82 +142,142 @@
  102    102   
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  103    103   
            builder,
  104    104   
            ::http::header::CONTENT_TYPE,
  105    105   
            "application/json",
  106    106   
        );
  107    107   
        /* ServerHttpBoundProtocolGenerator.kt:732 */
  108    108   
        let http_status: u16 = 200;
  109    109   
        builder = builder.status(http_status);
  110    110   
        /* ServerHttpBoundProtocolGenerator.kt:611 */
  111    111   
        let payload =
  112         -
            /* HttpBoundProtocolPayloadGenerator.kt:235 */crate::protocol_serde::shape_timestamp_format_headers_output::ser_timestamp_format_headers_output_output_output(&output)?
         112  +
            /* HttpBoundProtocolPayloadGenerator.kt:240 */crate::protocol_serde::shape_timestamp_format_headers_output::ser_timestamp_format_headers_output_output_output(&output)?
  113    113   
        /* ServerHttpBoundProtocolGenerator.kt:611 */;
  114    114   
        /* ServerHttpBoundProtocolGenerator.kt:713 */
  115    115   
        let content_length = payload.len();
  116    116   
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  117    117   
            builder,
  118    118   
            ::http::header::CONTENT_LENGTH,
  119    119   
            content_length,
  120    120   
        );
  121    121   
        /* ServerHttpBoundProtocolGenerator.kt:617 */
  122    122   
        let body = ::aws_smithy_legacy_http_server::body::to_boxed(payload);

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

@@ -36,36 +82,82 @@
   56     56   
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   57     57   
            builder,
   58     58   
            ::http::header::CONTENT_TYPE,
   59     59   
            "application/json",
   60     60   
        );
   61     61   
        /* ServerHttpBoundProtocolGenerator.kt:732 */
   62     62   
        let http_status: u16 = 200;
   63     63   
        builder = builder.status(http_status);
   64     64   
        /* ServerHttpBoundProtocolGenerator.kt:611 */
   65     65   
        let payload =
   66         -
            /* HttpBoundProtocolPayloadGenerator.kt:233 */""
          66  +
            /* HttpBoundProtocolPayloadGenerator.kt:238 */""
   67     67   
        /* ServerHttpBoundProtocolGenerator.kt:611 */;
   68     68   
        /* ServerHttpBoundProtocolGenerator.kt:713 */
   69     69   
        let content_length = payload.len();
   70     70   
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   71     71   
            builder,
   72     72   
            ::http::header::CONTENT_LENGTH,
   73     73   
            content_length,
   74     74   
        );
   75     75   
        /* ServerHttpBoundProtocolGenerator.kt:617 */
   76     76   
        let body = ::aws_smithy_legacy_http_server::body::to_boxed(payload);

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

@@ -367,367 +427,427 @@
  387    387   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
  388    388   
            builder,
  389    389   
            ::http_1x::header::CONTENT_TYPE,
  390    390   
            "application/json",
  391    391   
        );
  392    392   
        /* ServerHttpBoundProtocolGenerator.kt:732 */
  393    393   
        let http_status: u16 = 200;
  394    394   
        builder = builder.status(http_status);
  395    395   
        /* ServerHttpBoundProtocolGenerator.kt:611 */
  396    396   
        let payload =
  397         -
            /* HttpBoundProtocolPayloadGenerator.kt:233 */""
         397  +
            /* HttpBoundProtocolPayloadGenerator.kt:238 */""
  398    398   
        /* ServerHttpBoundProtocolGenerator.kt:611 */;
  399    399   
        /* ServerHttpBoundProtocolGenerator.kt:713 */
  400    400   
        let content_length = payload.len();
  401    401   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
  402    402   
            builder,
  403    403   
            ::http_1x::header::CONTENT_LENGTH,
  404    404   
            content_length,
  405    405   
        );
  406    406   
        /* ServerHttpBoundProtocolGenerator.kt:617 */
  407    407   
        let body = ::aws_smithy_http_server::body::to_boxed(payload);

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

@@ -59,59 +105,105 @@
   79     79   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   80     80   
            builder,
   81     81   
            ::http_1x::header::CONTENT_TYPE,
   82     82   
            "application/json",
   83     83   
        );
   84     84   
        /* ServerHttpBoundProtocolGenerator.kt:732 */
   85     85   
        let http_status: u16 = 200;
   86     86   
        builder = builder.status(http_status);
   87     87   
        /* ServerHttpBoundProtocolGenerator.kt:611 */
   88     88   
        let payload =
   89         -
            /* HttpBoundProtocolPayloadGenerator.kt:233 */""
          89  +
            /* HttpBoundProtocolPayloadGenerator.kt:238 */""
   90     90   
        /* ServerHttpBoundProtocolGenerator.kt:611 */;
   91     91   
        /* ServerHttpBoundProtocolGenerator.kt:713 */
   92     92   
        let content_length = payload.len();
   93     93   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   94     94   
            builder,
   95     95   
            ::http_1x::header::CONTENT_LENGTH,
   96     96   
            content_length,
   97     97   
        );
   98     98   
        /* ServerHttpBoundProtocolGenerator.kt:617 */
   99     99   
        let body = ::aws_smithy_http_server::body::to_boxed(payload);

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

@@ -55,55 +115,115 @@
   75     75   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   76     76   
            builder,
   77     77   
            ::http_1x::header::CONTENT_TYPE,
   78     78   
            "application/json",
   79     79   
        );
   80     80   
        /* ServerHttpBoundProtocolGenerator.kt:732 */
   81     81   
        let http_status: u16 = 200;
   82     82   
        builder = builder.status(http_status);
   83     83   
        /* ServerHttpBoundProtocolGenerator.kt:611 */
   84     84   
        let payload =
   85         -
            /* HttpBoundProtocolPayloadGenerator.kt:233 */""
          85  +
            /* HttpBoundProtocolPayloadGenerator.kt:238 */""
   86     86   
        /* ServerHttpBoundProtocolGenerator.kt:611 */;
   87     87   
        /* ServerHttpBoundProtocolGenerator.kt:713 */
   88     88   
        let content_length = payload.len();
   89     89   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   90     90   
            builder,
   91     91   
            ::http_1x::header::CONTENT_LENGTH,
   92     92   
            content_length,
   93     93   
        );
   94     94   
        /* ServerHttpBoundProtocolGenerator.kt:617 */
   95     95   
        let body = ::aws_smithy_http_server::body::to_boxed(payload);

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

@@ -51,51 +111,111 @@
   71     71   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   72     72   
            builder,
   73     73   
            ::http_1x::header::CONTENT_TYPE,
   74     74   
            "application/json",
   75     75   
        );
   76     76   
        /* ServerHttpBoundProtocolGenerator.kt:732 */
   77     77   
        let http_status: u16 = 200;
   78     78   
        builder = builder.status(http_status);
   79     79   
        /* ServerHttpBoundProtocolGenerator.kt:611 */
   80     80   
        let payload =
   81         -
            /* HttpBoundProtocolPayloadGenerator.kt:235 */crate::protocol_serde::shape_content_type_parameters_output::ser_content_type_parameters_output_output_output(&output)?
          81  +
            /* HttpBoundProtocolPayloadGenerator.kt:240 */crate::protocol_serde::shape_content_type_parameters_output::ser_content_type_parameters_output_output_output(&output)?
   82     82   
        /* ServerHttpBoundProtocolGenerator.kt:611 */;
   83     83   
        /* ServerHttpBoundProtocolGenerator.kt:713 */
   84     84   
        let content_length = payload.len();
   85     85   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   86     86   
            builder,
   87     87   
            ::http_1x::header::CONTENT_LENGTH,
   88     88   
            content_length,
   89     89   
        );
   90     90   
        /* ServerHttpBoundProtocolGenerator.kt:617 */
   91     91   
        let body = ::aws_smithy_http_server::body::to_boxed(payload);

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

@@ -34,34 +80,80 @@
   54     54   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   55     55   
            builder,
   56     56   
            ::http_1x::header::CONTENT_TYPE,
   57     57   
            "application/json",
   58     58   
        );
   59     59   
        /* ServerHttpBoundProtocolGenerator.kt:732 */
   60     60   
        let http_status: u16 = 200;
   61     61   
        builder = builder.status(http_status);
   62     62   
        /* ServerHttpBoundProtocolGenerator.kt:611 */
   63     63   
        let payload =
   64         -
            /* HttpBoundProtocolPayloadGenerator.kt:235 */crate::protocol_serde::shape_datetime_offsets_output::ser_datetime_offsets_output_output_output(&output)?
          64  +
            /* HttpBoundProtocolPayloadGenerator.kt:240 */crate::protocol_serde::shape_datetime_offsets_output::ser_datetime_offsets_output_output_output(&output)?
   65     65   
        /* ServerHttpBoundProtocolGenerator.kt:611 */;
   66     66   
        /* ServerHttpBoundProtocolGenerator.kt:713 */
   67     67   
        let content_length = payload.len();
   68     68   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   69     69   
            builder,
   70     70   
            ::http_1x::header::CONTENT_LENGTH,
   71     71   
            content_length,
   72     72   
        );
   73     73   
        /* ServerHttpBoundProtocolGenerator.kt:617 */
   74     74   
        let body = ::aws_smithy_http_server::body::to_boxed(payload);

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

@@ -50,50 +110,110 @@
   70     70   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   71     71   
            builder,
   72     72   
            ::http_1x::header::CONTENT_TYPE,
   73     73   
            "application/json",
   74     74   
        );
   75     75   
        /* ServerHttpBoundProtocolGenerator.kt:732 */
   76     76   
        let http_status: u16 = 200;
   77     77   
        builder = builder.status(http_status);
   78     78   
        /* ServerHttpBoundProtocolGenerator.kt:611 */
   79     79   
        let payload =
   80         -
            /* HttpBoundProtocolPayloadGenerator.kt:235 */crate::protocol_serde::shape_document_type_output::ser_document_type_output_output_output(&output)?
          80  +
            /* HttpBoundProtocolPayloadGenerator.kt:240 */crate::protocol_serde::shape_document_type_output::ser_document_type_output_output_output(&output)?
   81     81   
        /* ServerHttpBoundProtocolGenerator.kt:611 */;
   82     82   
        /* ServerHttpBoundProtocolGenerator.kt:713 */
   83     83   
        let content_length = payload.len();
   84     84   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   85     85   
            builder,
   86     86   
            ::http_1x::header::CONTENT_LENGTH,
   87     87   
            content_length,
   88     88   
        );
   89     89   
        /* ServerHttpBoundProtocolGenerator.kt:617 */
   90     90   
        let body = ::aws_smithy_http_server::body::to_boxed(payload);

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

@@ -47,47 +107,107 @@
   67     67   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   68     68   
            builder,
   69     69   
            ::http_1x::header::CONTENT_TYPE,
   70     70   
            "application/json",
   71     71   
        );
   72     72   
        /* ServerHttpBoundProtocolGenerator.kt:732 */
   73     73   
        let http_status: u16 = 200;
   74     74   
        builder = builder.status(http_status);
   75     75   
        /* ServerHttpBoundProtocolGenerator.kt:611 */
   76     76   
        let payload =
   77         -
            /* HttpBoundProtocolPayloadGenerator.kt:235 */crate::protocol_serde::shape_document_type_as_map_value_output::ser_document_type_as_map_value_output_output_output(&output)?
          77  +
            /* HttpBoundProtocolPayloadGenerator.kt:240 */crate::protocol_serde::shape_document_type_as_map_value_output::ser_document_type_as_map_value_output_output_output(&output)?
   78     78   
        /* ServerHttpBoundProtocolGenerator.kt:611 */;
   79     79   
        /* ServerHttpBoundProtocolGenerator.kt:713 */
   80     80   
        let content_length = payload.len();
   81     81   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   82     82   
            builder,
   83     83   
            ::http_1x::header::CONTENT_LENGTH,
   84     84   
            content_length,
   85     85   
        );
   86     86   
        /* ServerHttpBoundProtocolGenerator.kt:617 */
   87     87   
        let body = ::aws_smithy_http_server::body::to_boxed(payload);

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

@@ -50,50 +96,96 @@
   70     70   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   71     71   
            builder,
   72     72   
            ::http_1x::header::CONTENT_TYPE,
   73     73   
            "application/json",
   74     74   
        );
   75     75   
        /* ServerHttpBoundProtocolGenerator.kt:732 */
   76     76   
        let http_status: u16 = 200;
   77     77   
        builder = builder.status(http_status);
   78     78   
        /* ServerHttpBoundProtocolGenerator.kt:611 */
   79     79   
        let payload =
   80         -
            /* HttpBoundProtocolPayloadGenerator.kt:348 */crate::protocol_serde::shape_document_type_as_payload_output::ser_document_value_http_payload(& output.document_value)?
          80  +
            /* HttpBoundProtocolPayloadGenerator.kt:353 */crate::protocol_serde::shape_document_type_as_payload_output::ser_document_value_http_payload(& output.document_value)?
   81     81   
        /* ServerHttpBoundProtocolGenerator.kt:611 */;
   82     82   
        /* ServerHttpBoundProtocolGenerator.kt:713 */
   83     83   
        let content_length = payload.len();
   84     84   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   85     85   
            builder,
   86     86   
            ::http_1x::header::CONTENT_LENGTH,
   87     87   
            content_length,
   88     88   
        );
   89     89   
        /* ServerHttpBoundProtocolGenerator.kt:617 */
   90     90   
        let body = ::aws_smithy_http_server::body::to_boxed(payload);

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

@@ -1,1 +22,22 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
/* HttpBoundProtocolPayloadGenerator.kt:309 */
           2  +
/* HttpBoundProtocolPayloadGenerator.kt:314 */
    3      3   
pub fn ser_document_value_http_payload(
    4      4   
    payload: &::std::option::Option<::aws_smithy_types::Document>,
    5      5   
) -> ::std::result::Result<::std::vec::Vec<u8>, ::aws_smithy_types::error::operation::BuildError> {
    6         -
    /* HttpBoundProtocolPayloadGenerator.kt:318 */
           6  +
    /* HttpBoundProtocolPayloadGenerator.kt:323 */
    7      7   
    let payload = match payload.as_ref() {
    8      8   
        Some(t) => t,
    9      9   
        None => {
   10     10   
            return Ok(
   11         -
                /* HttpBoundProtocolPayloadGenerator.kt:330 */
   12         -
                Vec::new(), /* HttpBoundProtocolPayloadGenerator.kt:318 */
          11  +
                /* HttpBoundProtocolPayloadGenerator.kt:335 */
          12  +
                Vec::new(), /* HttpBoundProtocolPayloadGenerator.kt:323 */
   13     13   
            )
   14     14   
        }
   15     15   
    };
   16         -
    /* HttpBoundProtocolPayloadGenerator.kt:343 */
          16  +
    /* HttpBoundProtocolPayloadGenerator.kt:348 */
   17     17   
    Ok(
   18         -
        /* HttpBoundProtocolPayloadGenerator.kt:391 */
   19         -
        crate::protocol_serde::serialize_document(payload), /* HttpBoundProtocolPayloadGenerator.kt:343 */
          18  +
        /* HttpBoundProtocolPayloadGenerator.kt:396 */
          19  +
        crate::protocol_serde::serialize_document(payload), /* HttpBoundProtocolPayloadGenerator.kt:348 */
   20     20   
    )
   21         -
    /* HttpBoundProtocolPayloadGenerator.kt:309 */
          21  +
    /* HttpBoundProtocolPayloadGenerator.kt:314 */
   22     22   
}