Server Test Python

Server Test Python

rev. 52a747aa19d8f7ff1fb936dafeb9929959f2f20f

Files changed:

tmp-codegen-diff/codegen-server-test-python/constraints/rust-server-codegen-python/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-python/constraints_without_public_constrained_types/rust-server-codegen-python/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-python/pokemon-service-server-sdk/rust-server-codegen-python/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_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 =
   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>>(