Server Test

Server Test

rev. 52a747aa19d8f7ff1fb936dafeb9929959f2f20f

Files changed:

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

@@ -1,1 +68,58 @@
   14     14   
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
   15     15   
{
   16     16   
    Ok({
   17     17   
        #[allow(unused_mut)]
   18     18   
        let mut input = crate::input::event_streams_operation_input::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   
        if let Some(value) = {
   24         -
            let mut receiver =
          24  +
            let receiver =
   25     25   
                crate::protocol_serde::shape_event_streams_operation_input::de_events_payload(
   26     26   
                    &mut body.into().into_inner(),
   27     27   
                )?;
   28         -
            if let Some(_initial_event) = receiver
   29         -
                                                .try_recv_initial(::aws_smithy_http::event_stream::InitialMessageType::Request)
   30         -
                                                .await
   31         -
                                                .map_err(
   32         -
                                                    |ev_error| ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::ConstraintViolation(
   33         -
                                                        #[allow(clippy::useless_conversion)]
   34         -
                                                        format!("{ev_error}").into()
   35         -
                                                    )
   36         -
                                                )? {
   37         -
                                                
   38         -
                                            }
          28  +
   39     29   
            Some(receiver)
   40     30   
        } {
   41     31   
            input = input.set_events(value)
   42     32   
        }
   43     33   
        input.build()?
   44     34   
    })
   45     35   
}
   46     36   
   47     37   
#[allow(clippy::unnecessary_wraps)]
   48     38   
pub fn ser_event_streams_operation_http_response(

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

@@ -1,1 +68,58 @@
   14     14   
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
   15     15   
{
   16     16   
    Ok({
   17     17   
        #[allow(unused_mut)]
   18     18   
        let mut input = crate::input::event_streams_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   
        if let Some(value) = {
   24         -
            let mut receiver =
          24  +
            let receiver =
   25     25   
                crate::protocol_serde::shape_event_streams_operation_input::de_events_payload(
   26     26   
                    &mut body.into().into_inner(),
   27     27   
                )?;
   28         -
            if let Some(_initial_event) = receiver
   29         -
                                                .try_recv_initial(::aws_smithy_http::event_stream::InitialMessageType::Request)
   30         -
                                                .await
   31         -
                                                .map_err(
   32         -
                                                    |ev_error| ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::ConstraintViolation(
   33         -
                                                        #[allow(clippy::useless_conversion)]
   34         -
                                                        format!("{ev_error}").into()
   35         -
                                                    )
   36         -
                                                )? {
   37         -
                                                
   38         -
                                            }
          28  +
   39     29   
            Some(receiver)
   40     30   
        } {
   41     31   
            input = input.set_events(value)
   42     32   
        }
   43     33   
        input.build()?
   44     34   
    })
   45     35   
}
   46     36   
   47     37   
#[allow(clippy::unnecessary_wraps)]
   48     38   
pub fn ser_event_streams_operation_http_response(

tmp-codegen-diff/codegen-server-test/pokemon-service-awsjson-server-sdk/rust-server-codegen/src/protocol_serde/shape_capture_pokemon.rs

@@ -1,1 +68,57 @@
   14     14   
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
   15     15   
{
   16     16   
    Ok({
   17     17   
        #[allow(unused_mut)]
   18     18   
        let mut input = crate::input::capture_pokemon_input::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   
        if let Some(value) = {
   24         -
            let mut receiver =
   25         -
                crate::protocol_serde::shape_capture_pokemon_input::de_events_payload(
   26         -
                    &mut body.into().into_inner(),
   27         -
                )?;
   28         -
            if let Some(_initial_event) = receiver
   29         -
                                                .try_recv_initial(::aws_smithy_http::event_stream::InitialMessageType::Request)
   30         -
                                                .await
   31         -
                                                .map_err(
   32         -
                                                    |ev_error| ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection::ConstraintViolation(
   33         -
                                                        #[allow(clippy::useless_conversion)]
   34         -
                                                        format!("{ev_error}").into()
   35         -
                                                    )
   36         -
                                                )? {
   37         -
                                                
   38         -
                                            }
          24  +
            let receiver = crate::protocol_serde::shape_capture_pokemon_input::de_events_payload(
          25  +
                &mut body.into().into_inner(),
          26  +
            )?;
          27  +
   39     28   
            Some(receiver)
   40     29   
        } {
   41     30   
            input = input.set_events(value)
   42     31   
        }
   43     32   
        input.build()?
   44     33   
    })
   45     34   
}
   46     35   
   47     36   
#[allow(clippy::unnecessary_wraps)]
   48     37   
pub fn ser_capture_pokemon_http_response(

tmp-codegen-diff/codegen-server-test/pokemon-service-server-sdk/rust-server-codegen/src/protocol_serde/shape_capture_pokemon.rs

@@ -1,1 +68,57 @@
   14     14   
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
   15     15   
{
   16     16   
    Ok({
   17     17   
        #[allow(unused_mut)]
   18     18   
        let mut input = crate::input::capture_pokemon_input::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   
        if let Some(value) = {
   24         -
            let mut receiver =
   25         -
                crate::protocol_serde::shape_capture_pokemon_input::de_events_payload(
   26         -
                    &mut body.into().into_inner(),
   27         -
                )?;
   28         -
            if let Some(_initial_event) = receiver
   29         -
                                                .try_recv_initial(::aws_smithy_http::event_stream::InitialMessageType::Request)
   30         -
                                                .await
   31         -
                                                .map_err(
   32         -
                                                    |ev_error| ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::ConstraintViolation(
   33         -
                                                        #[allow(clippy::useless_conversion)]
   34         -
                                                        format!("{ev_error}").into()
   35         -
                                                    )
   36         -
                                                )? {
   37         -
                                                
   38         -
                                            }
          24  +
            let receiver = crate::protocol_serde::shape_capture_pokemon_input::de_events_payload(
          25  +
                &mut body.into().into_inner(),
          26  +
            )?;
          27  +
   39     28   
            Some(receiver)
   40     29   
        } {
   41     30   
            input = input.set_events(value)
   42     31   
        }
   43     32   
        let input_string = uri.path();
   44     33   
        let (input_string, (_, m1)) =
   45     34   
            ::nom::sequence::tuple::<_, _, ::nom::error::Error<&str>, _>((
   46     35   
                ::nom::sequence::preceded(
   47     36   
                    ::nom::bytes::complete::tag("/"),
   48     37   
                    ::nom::bytes::complete::tag::<_, _, ::nom::error::Error<&str>>(

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

@@ -1,1 +68,58 @@
   14     14   
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
   15     15   
{
   16     16   
    Ok({
   17     17   
        #[allow(unused_mut)]
   18     18   
        let mut input = crate::input::streaming_operation_input::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   
        if let Some(value) = {
   24         -
            let mut receiver =
          24  +
            let receiver =
   25     25   
                crate::protocol_serde::shape_streaming_operation_input::de_events_payload(
   26     26   
                    &mut body.into().into_inner(),
   27     27   
                )?;
   28         -
            if let Some(_initial_event) = receiver
   29         -
                                                .try_recv_initial(::aws_smithy_http::event_stream::InitialMessageType::Request)
   30         -
                                                .await
   31         -
                                                .map_err(
   32         -
                                                    |ev_error| ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection::ConstraintViolation(
   33         -
                                                        #[allow(clippy::useless_conversion)]
   34         -
                                                        format!("{ev_error}").into()
   35         -
                                                    )
   36         -
                                                )? {
   37         -
                                                
   38         -
                                            }
          28  +
   39     29   
            Some(receiver)
   40     30   
        } {
   41     31   
            input = input.set_events(value)
   42     32   
        }
   43     33   
        input.build()?
   44     34   
    })
   45     35   
}
   46     36   
   47     37   
#[allow(clippy::unnecessary_wraps)]
   48     38   
pub fn ser_streaming_operation_http_response(

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

@@ -1,1 +66,67 @@
   15     15   
{
   16     16   
    Ok({
   17     17   
        #[allow(unused_mut)]
   18     18   
        let mut input =
   19     19   
            crate::input::streaming_operation_with_initial_data_input::Builder::default();
   20     20   
        #[allow(unused_variables)]
   21     21   
        let ::aws_smithy_runtime_api::http::RequestParts {
   22     22   
            uri, headers, body, ..
   23     23   
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
   24     24   
        if let Some(value) = {
   25         -
            let mut receiver = crate::protocol_serde::shape_streaming_operation_with_initial_data_input::de_events_payload(&mut body.into().into_inner())?;
          25  +
            let receiver = crate::protocol_serde::shape_streaming_operation_with_initial_data_input::de_events_payload(&mut body.into().into_inner())?;
          26  +
            let mut receiver = receiver;
   26     27   
            if let Some(_initial_event) = receiver
   27         -
                                                .try_recv_initial(::aws_smithy_http::event_stream::InitialMessageType::Request)
   28         -
                                                .await
   29         -
                                                .map_err(
   30         -
                                                    |ev_error| ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection::ConstraintViolation(
   31         -
                                                        #[allow(clippy::useless_conversion)]
   32         -
                                                        format!("{ev_error}").into()
   33         -
                                                    )
   34         -
                                                )? {
   35         -
                                                input = crate::protocol_serde::shape_streaming_operation_with_initial_data::de_streaming_operation_with_initial_data(_initial_event.payload(), input)?;
   36         -
                                            }
          28  +
                                                            .try_recv_initial(::aws_smithy_http::event_stream::InitialMessageType::Request)
          29  +
                                                            .await
          30  +
                                                            .map_err(
          31  +
                                                                |ev_error| ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection::ConstraintViolation(
          32  +
                                                                    #[allow(clippy::useless_conversion)]
          33  +
                                                                    format!("{ev_error}").into()
          34  +
                                                                )
          35  +
                                                            )? {
          36  +
                                                            input = crate::protocol_serde::shape_streaming_operation_with_initial_data::de_streaming_operation_with_initial_data(_initial_event.payload(), input)?;
          37  +
                                                        }
   37     38   
            Some(receiver)
   38     39   
        } {
   39     40   
            input = input.set_events(value)
   40     41   
        }
   41     42   
        input.build()?
   42     43   
    })
   43     44   
}
   44     45   
   45     46   
#[allow(clippy::unnecessary_wraps)]
   46     47   
pub fn ser_streaming_operation_with_initial_data_http_response(

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

@@ -1,1 +66,56 @@
   15     15   
{
   16     16   
    Ok({
   17     17   
        #[allow(unused_mut)]
   18     18   
        let mut input =
   19     19   
            crate::input::streaming_operation_with_initial_response_input::Builder::default();
   20     20   
        #[allow(unused_variables)]
   21     21   
        let ::aws_smithy_runtime_api::http::RequestParts {
   22     22   
            uri, headers, body, ..
   23     23   
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
   24     24   
        if let Some(value) = {
   25         -
            let mut receiver = crate::protocol_serde::shape_streaming_operation_with_initial_response_input::de_events_payload(&mut body.into().into_inner())?;
   26         -
            if let Some(_initial_event) = receiver
   27         -
                                                .try_recv_initial(::aws_smithy_http::event_stream::InitialMessageType::Request)
   28         -
                                                .await
   29         -
                                                .map_err(
   30         -
                                                    |ev_error| ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection::ConstraintViolation(
   31         -
                                                        #[allow(clippy::useless_conversion)]
   32         -
                                                        format!("{ev_error}").into()
   33         -
                                                    )
   34         -
                                                )? {
   35         -
                                                
   36         -
                                            }
          25  +
            let receiver = crate::protocol_serde::shape_streaming_operation_with_initial_response_input::de_events_payload(&mut body.into().into_inner())?;
          26  +
   37     27   
            Some(receiver)
   38     28   
        } {
   39     29   
            input = input.set_events(value)
   40     30   
        }
   41     31   
        input.build()?
   42     32   
    })
   43     33   
}
   44     34   
   45     35   
#[allow(clippy::unnecessary_wraps)]
   46     36   
pub fn ser_streaming_operation_with_initial_response_http_response(

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

@@ -1,1 +66,67 @@
   15     15   
{
   16     16   
    Ok({
   17     17   
        #[allow(unused_mut)]
   18     18   
        let mut input =
   19     19   
            crate::input::streaming_operation_with_optional_data_input::Builder::default();
   20     20   
        #[allow(unused_variables)]
   21     21   
        let ::aws_smithy_runtime_api::http::RequestParts {
   22     22   
            uri, headers, body, ..
   23     23   
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
   24     24   
        if let Some(value) = {
   25         -
            let mut receiver = crate::protocol_serde::shape_streaming_operation_with_optional_data_input::de_events_payload(&mut body.into().into_inner())?;
          25  +
            let receiver = crate::protocol_serde::shape_streaming_operation_with_optional_data_input::de_events_payload(&mut body.into().into_inner())?;
          26  +
            let mut receiver = receiver;
   26     27   
            if let Some(_initial_event) = receiver
   27         -
                                                .try_recv_initial(::aws_smithy_http::event_stream::InitialMessageType::Request)
   28         -
                                                .await
   29         -
                                                .map_err(
   30         -
                                                    |ev_error| ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection::ConstraintViolation(
   31         -
                                                        #[allow(clippy::useless_conversion)]
   32         -
                                                        format!("{ev_error}").into()
   33         -
                                                    )
   34         -
                                                )? {
   35         -
                                                input = crate::protocol_serde::shape_streaming_operation_with_optional_data::de_streaming_operation_with_optional_data(_initial_event.payload(), input)?;
   36         -
                                            }
          28  +
                                                            .try_recv_initial(::aws_smithy_http::event_stream::InitialMessageType::Request)
          29  +
                                                            .await
          30  +
                                                            .map_err(
          31  +
                                                                |ev_error| ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection::ConstraintViolation(
          32  +
                                                                    #[allow(clippy::useless_conversion)]
          33  +
                                                                    format!("{ev_error}").into()
          34  +
                                                                )
          35  +
                                                            )? {
          36  +
                                                            input = crate::protocol_serde::shape_streaming_operation_with_optional_data::de_streaming_operation_with_optional_data(_initial_event.payload(), input)?;
          37  +
                                                        }
   37     38   
            Some(receiver)
   38     39   
        } {
   39     40   
            input = input.set_events(value)
   40     41   
        }
   41     42   
        input.build()?
   42     43   
    })
   43     44   
}
   44     45   
   45     46   
#[allow(clippy::unnecessary_wraps)]
   46     47   
pub fn ser_streaming_operation_with_optional_data_http_response(

tmp-codegen-diff/codegen-server-test/rpcv2Cbor_extras_no_initial_response/rust-server-codegen/src/protocol_serde/shape_streaming_operation.rs

@@ -1,1 +68,58 @@
   14     14   
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
   15     15   
{
   16     16   
    Ok({
   17     17   
        #[allow(unused_mut)]
   18     18   
        let mut input = crate::input::streaming_operation_input::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   
        if let Some(value) = {
   24         -
            let mut receiver =
          24  +
            let receiver =
   25     25   
                crate::protocol_serde::shape_streaming_operation_input::de_events_payload(
   26     26   
                    &mut body.into().into_inner(),
   27     27   
                )?;
   28         -
            if let Some(_initial_event) = receiver
   29         -
                                                .try_recv_initial(::aws_smithy_http::event_stream::InitialMessageType::Request)
   30         -
                                                .await
   31         -
                                                .map_err(
   32         -
                                                    |ev_error| ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection::ConstraintViolation(
   33         -
                                                        #[allow(clippy::useless_conversion)]
   34         -
                                                        format!("{ev_error}").into()
   35         -
                                                    )
   36         -
                                                )? {
   37         -
                                                
   38         -
                                            }
          28  +
   39     29   
            Some(receiver)
   40     30   
        } {
   41     31   
            input = input.set_events(value)
   42     32   
        }
   43     33   
        input.build()?
   44     34   
    })
   45     35   
}
   46     36   
   47     37   
#[allow(clippy::unnecessary_wraps)]
   48     38   
pub fn ser_streaming_operation_http_response(

tmp-codegen-diff/codegen-server-test/rpcv2Cbor_extras_no_initial_response/rust-server-codegen/src/protocol_serde/shape_streaming_operation_with_initial_data.rs

@@ -1,1 +66,67 @@
   15     15   
{
   16     16   
    Ok({
   17     17   
        #[allow(unused_mut)]
   18     18   
        let mut input =
   19     19   
            crate::input::streaming_operation_with_initial_data_input::Builder::default();
   20     20   
        #[allow(unused_variables)]
   21     21   
        let ::aws_smithy_runtime_api::http::RequestParts {
   22     22   
            uri, headers, body, ..
   23     23   
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
   24     24   
        if let Some(value) = {
   25         -
            let mut receiver = crate::protocol_serde::shape_streaming_operation_with_initial_data_input::de_events_payload(&mut body.into().into_inner())?;
          25  +
            let receiver = crate::protocol_serde::shape_streaming_operation_with_initial_data_input::de_events_payload(&mut body.into().into_inner())?;
          26  +
            let mut receiver = receiver;
   26     27   
            if let Some(_initial_event) = receiver
   27         -
                                                .try_recv_initial(::aws_smithy_http::event_stream::InitialMessageType::Request)
   28         -
                                                .await
   29         -
                                                .map_err(
   30         -
                                                    |ev_error| ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection::ConstraintViolation(
   31         -
                                                        #[allow(clippy::useless_conversion)]
   32         -
                                                        format!("{ev_error}").into()
   33         -
                                                    )
   34         -
                                                )? {
   35         -
                                                input = crate::protocol_serde::shape_streaming_operation_with_initial_data::de_streaming_operation_with_initial_data(_initial_event.payload(), input)?;
   36         -
                                            }
          28  +
                                                            .try_recv_initial(::aws_smithy_http::event_stream::InitialMessageType::Request)
          29  +
                                                            .await
          30  +
                                                            .map_err(
          31  +
                                                                |ev_error| ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection::ConstraintViolation(
          32  +
                                                                    #[allow(clippy::useless_conversion)]
          33  +
                                                                    format!("{ev_error}").into()
          34  +
                                                                )
          35  +
                                                            )? {
          36  +
                                                            input = crate::protocol_serde::shape_streaming_operation_with_initial_data::de_streaming_operation_with_initial_data(_initial_event.payload(), input)?;
          37  +
                                                        }
   37     38   
            Some(receiver)
   38     39   
        } {
   39     40   
            input = input.set_events(value)
   40     41   
        }
   41     42   
        input.build()?
   42     43   
    })
   43     44   
}
   44     45   
   45     46   
#[allow(clippy::unnecessary_wraps)]
   46     47   
pub fn ser_streaming_operation_with_initial_data_http_response(

tmp-codegen-diff/codegen-server-test/rpcv2Cbor_extras_no_initial_response/rust-server-codegen/src/protocol_serde/shape_streaming_operation_with_initial_response.rs

@@ -1,1 +66,56 @@
   15     15   
{
   16     16   
    Ok({
   17     17   
        #[allow(unused_mut)]
   18     18   
        let mut input =
   19     19   
            crate::input::streaming_operation_with_initial_response_input::Builder::default();
   20     20   
        #[allow(unused_variables)]
   21     21   
        let ::aws_smithy_runtime_api::http::RequestParts {
   22     22   
            uri, headers, body, ..
   23     23   
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
   24     24   
        if let Some(value) = {
   25         -
            let mut receiver = crate::protocol_serde::shape_streaming_operation_with_initial_response_input::de_events_payload(&mut body.into().into_inner())?;
   26         -
            if let Some(_initial_event) = receiver
   27         -
                                                .try_recv_initial(::aws_smithy_http::event_stream::InitialMessageType::Request)
   28         -
                                                .await
   29         -
                                                .map_err(
   30         -
                                                    |ev_error| ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection::ConstraintViolation(
   31         -
                                                        #[allow(clippy::useless_conversion)]
   32         -
                                                        format!("{ev_error}").into()
   33         -
                                                    )
   34         -
                                                )? {
   35         -
                                                
   36         -
                                            }
          25  +
            let receiver = crate::protocol_serde::shape_streaming_operation_with_initial_response_input::de_events_payload(&mut body.into().into_inner())?;
          26  +
   37     27   
            Some(receiver)
   38     28   
        } {
   39     29   
            input = input.set_events(value)
   40     30   
        }
   41     31   
        input.build()?
   42     32   
    })
   43     33   
}
   44     34   
   45     35   
#[allow(clippy::unnecessary_wraps)]
   46     36   
pub fn ser_streaming_operation_with_initial_response_http_response(

tmp-codegen-diff/codegen-server-test/rpcv2Cbor_extras_no_initial_response/rust-server-codegen/src/protocol_serde/shape_streaming_operation_with_optional_data.rs

@@ -1,1 +66,67 @@
   15     15   
{
   16     16   
    Ok({
   17     17   
        #[allow(unused_mut)]
   18     18   
        let mut input =
   19     19   
            crate::input::streaming_operation_with_optional_data_input::Builder::default();
   20     20   
        #[allow(unused_variables)]
   21     21   
        let ::aws_smithy_runtime_api::http::RequestParts {
   22     22   
            uri, headers, body, ..
   23     23   
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
   24     24   
        if let Some(value) = {
   25         -
            let mut receiver = crate::protocol_serde::shape_streaming_operation_with_optional_data_input::de_events_payload(&mut body.into().into_inner())?;
          25  +
            let receiver = crate::protocol_serde::shape_streaming_operation_with_optional_data_input::de_events_payload(&mut body.into().into_inner())?;
          26  +
            let mut receiver = receiver;
   26     27   
            if let Some(_initial_event) = receiver
   27         -
                                                .try_recv_initial(::aws_smithy_http::event_stream::InitialMessageType::Request)
   28         -
                                                .await
   29         -
                                                .map_err(
   30         -
                                                    |ev_error| ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection::ConstraintViolation(
   31         -
                                                        #[allow(clippy::useless_conversion)]
   32         -
                                                        format!("{ev_error}").into()
   33         -
                                                    )
   34         -
                                                )? {
   35         -
                                                input = crate::protocol_serde::shape_streaming_operation_with_optional_data::de_streaming_operation_with_optional_data(_initial_event.payload(), input)?;
   36         -
                                            }
          28  +
                                                            .try_recv_initial(::aws_smithy_http::event_stream::InitialMessageType::Request)
          29  +
                                                            .await
          30  +
                                                            .map_err(
          31  +
                                                                |ev_error| ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection::ConstraintViolation(
          32  +
                                                                    #[allow(clippy::useless_conversion)]
          33  +
                                                                    format!("{ev_error}").into()
          34  +
                                                                )
          35  +
                                                            )? {
          36  +
                                                            input = crate::protocol_serde::shape_streaming_operation_with_optional_data::de_streaming_operation_with_optional_data(_initial_event.payload(), input)?;
          37  +
                                                        }
   37     38   
            Some(receiver)
   38     39   
        } {
   39     40   
            input = input.set_events(value)
   40     41   
        }
   41     42   
        input.build()?
   42     43   
    })
   43     44   
}
   44     45   
   45     46   
#[allow(clippy::unnecessary_wraps)]
   46     47   
pub fn ser_streaming_operation_with_optional_data_http_response(