Client Test

Client Test

rev. 26e0a1e8aaec58e3c7fd18a79449d71bcadaf391

Files changed:

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/config/auth.rs

@@ -71,71 +148,130 @@
   91     91   
    pub fn builder() -> crate::config::auth::ParamsBuilder {
   92     92   
        crate::config::auth::ParamsBuilder::default()
   93     93   
    }
   94     94   
   95     95   
    /// Return the operation name for [`Params`]
   96     96   
    pub fn operation_name(&self) -> &str {
   97     97   
        self.operation_name.as_ref()
   98     98   
    }
   99     99   
}
  100    100   
  101         -
#[cfg(test)]
  102         -
#[derive(Debug)]
  103         -
pub(crate) struct NoAuthSchemeResolver;
  104         -
  105         -
#[cfg(test)]
  106         -
impl ResolveAuthScheme for NoAuthSchemeResolver {
  107         -
    fn resolve_auth_scheme<'a>(
  108         -
        &'a self,
  109         -
        _params: &'a crate::config::auth::Params,
  110         -
        _cfg: &'a ::aws_smithy_types::config_bag::ConfigBag,
  111         -
        _runtime_components: &'a ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponents,
  112         -
    ) -> ::aws_smithy_runtime_api::client::auth::AuthSchemeOptionsFuture<'a> {
  113         -
        ::aws_smithy_runtime_api::client::auth::AuthSchemeOptionsFuture::ready(::std::result::Result::Ok(vec![
  114         -
            ::aws_smithy_runtime_api::client::auth::AuthSchemeOption::from(::aws_smithy_runtime::client::auth::no_auth::NO_AUTH_SCHEME_ID),
  115         -
        ]))
  116         -
    }
  117         -
}
  118         -
  119    101   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  120    102   
/// Builder for [`Params`]
  121    103   
pub struct ParamsBuilder {
  122    104   
    operation_name: ::std::option::Option<::std::borrow::Cow<'static, str>>,
  123    105   
}
  124    106   
impl ParamsBuilder {
  125    107   
    /// Set the operation name for the builder
  126    108   
    pub fn operation_name(self, operation_name: impl Into<::std::borrow::Cow<'static, str>>) -> Self {
  127    109   
        self.set_operation_name(::std::option::Option::Some(operation_name.into()))
  128    110   
    }

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/operation/empty_operation.rs

@@ -218,218 +333,339 @@
  238    238   
mod empty_operation_test {
  239    239   
  240    240   
    /// Sends requests to /
  241    241   
    /// Test ID: sends_requests_to_slash
  242    242   
    #[::tokio::test]
  243    243   
    #[::tracing_test::traced_test]
  244    244   
    async fn sends_requests_to_slash_request() {
  245    245   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  246    246   
        let config_builder = crate::config::Config::builder()
  247    247   
            .with_test_defaults()
  248         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         248  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         249  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         250  +
            .allow_no_auth()
  249    251   
            .endpoint_url("https://example.com");
  250    252   
  251    253   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  252    254   
        let result = client.empty_operation().send().await;
  253    255   
        let _ = dbg!(result);
  254    256   
        let http_request = request_receiver.expect_request();
  255    257   
        let expected_headers = [
  256    258   
            ("Content-Type", "application/x-amz-json-1.1"),
  257    259   
            ("X-Amz-Target", "JsonProtocol.EmptyOperation"),
  258    260   
        ];
  259    261   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  260    262   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  261    263   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  262    264   
        ::pretty_assertions::assert_eq!(uri.path(), "/", "path was incorrect");
  263    265   
    }
  264    266   
  265    267   
    /// Includes X-Amz-Target header and Content-Type
  266    268   
    /// Test ID: includes_x_amz_target_and_content_type
  267    269   
    #[::tokio::test]
  268    270   
    #[::tracing_test::traced_test]
  269    271   
    async fn includes_x_amz_target_and_content_type_request() {
  270    272   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  271    273   
        let config_builder = crate::config::Config::builder()
  272    274   
            .with_test_defaults()
  273         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         275  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         276  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         277  +
            .allow_no_auth()
  274    278   
            .endpoint_url("https://example.com");
  275    279   
  276    280   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  277    281   
        let result = client.empty_operation().send().await;
  278    282   
        let _ = dbg!(result);
  279    283   
        let http_request = request_receiver.expect_request();
  280    284   
        let expected_headers = [
  281    285   
            ("Content-Type", "application/x-amz-json-1.1"),
  282    286   
            ("X-Amz-Target", "JsonProtocol.EmptyOperation"),
  283    287   
        ];
  284    288   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  285    289   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  286    290   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  287    291   
        ::pretty_assertions::assert_eq!(uri.path(), "/", "path was incorrect");
  288    292   
    }
  289    293   
  290    294   
    /// Clients must always send an empty JSON object payload for
  291    295   
    /// operations with no input (that is, `{}`). While AWS service
  292    296   
    /// implementations support requests with no payload or requests
  293    297   
    /// that send `{}`, always sending `{}` from the client is
  294    298   
    /// preferred for forward compatibility in case input is ever
  295    299   
    /// added to an operation.
  296    300   
    /// Test ID: json_1_1_client_sends_empty_payload_for_no_input_shape
  297    301   
    #[::tokio::test]
  298    302   
    #[::tracing_test::traced_test]
  299    303   
    async fn json_1_1_client_sends_empty_payload_for_no_input_shape_request() {
  300    304   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  301    305   
        let config_builder = crate::config::Config::builder()
  302    306   
            .with_test_defaults()
  303         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         307  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         308  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         309  +
            .allow_no_auth()
  304    310   
            .endpoint_url("https://example.com");
  305    311   
  306    312   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  307    313   
        let result = client.empty_operation().send().await;
  308    314   
        let _ = dbg!(result);
  309    315   
        let http_request = request_receiver.expect_request();
  310    316   
        let expected_headers = [
  311    317   
            ("Content-Type", "application/x-amz-json-1.1"),
  312    318   
            ("X-Amz-Target", "JsonProtocol.EmptyOperation"),
  313    319   
        ];

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/operation/endpoint_operation.rs

@@ -224,224 +284,286 @@
  244    244   
  245    245   
    /// Operations can prepend to the given host if they define the
  246    246   
    /// endpoint trait.
  247    247   
    /// Test ID: AwsJson11EndpointTrait
  248    248   
    #[::tokio::test]
  249    249   
    #[::tracing_test::traced_test]
  250    250   
    async fn aws_json11_endpoint_trait_request() {
  251    251   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  252    252   
        let config_builder = crate::config::Config::builder()
  253    253   
            .with_test_defaults()
  254         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         254  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         255  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         256  +
            .allow_no_auth()
  255    257   
            .endpoint_url("https://example.com");
  256    258   
  257    259   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  258    260   
        let result = client.endpoint_operation().send().await;
  259    261   
        let _ = dbg!(result);
  260    262   
        let http_request = request_receiver.expect_request();
  261    263   
        let expected_headers = [
  262    264   
            ("Content-Type", "application/x-amz-json-1.1"),
  263    265   
            ("X-Amz-Target", "JsonProtocol.EndpointOperation"),
  264    266   
        ];

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/operation/endpoint_with_host_label_operation.rs

@@ -249,249 +309,311 @@
  269    269   
    /// Operations can prepend to the given host if they define the
  270    270   
    /// endpoint trait, and can use the host label trait to define
  271    271   
    /// further customization based on user input.
  272    272   
    /// Test ID: AwsJson11EndpointTraitWithHostLabel
  273    273   
    #[::tokio::test]
  274    274   
    #[::tracing_test::traced_test]
  275    275   
    async fn aws_json11_endpoint_trait_with_host_label_request() {
  276    276   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  277    277   
        let config_builder = crate::config::Config::builder()
  278    278   
            .with_test_defaults()
  279         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         279  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         280  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         281  +
            .allow_no_auth()
  280    282   
            .endpoint_url("https://example.com");
  281    283   
  282    284   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  283    285   
        let result = client
  284    286   
            .endpoint_with_host_label_operation()
  285    287   
            .set_label(::std::option::Option::Some("bar".to_owned()))
  286    288   
            .send()
  287    289   
            .await;
  288    290   
        let _ = dbg!(result);
  289    291   
        let http_request = request_receiver.expect_request();

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/operation/host_with_path_operation.rs

@@ -226,226 +286,288 @@
  246    246   
mod host_with_path_operation_test {
  247    247   
  248    248   
    /// Custom endpoints supplied by users can have paths
  249    249   
    /// Test ID: AwsJson11HostWithPath
  250    250   
    #[::tokio::test]
  251    251   
    #[::tracing_test::traced_test]
  252    252   
    async fn aws_json11_host_with_path_request() {
  253    253   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  254    254   
        let config_builder = crate::config::Config::builder()
  255    255   
            .with_test_defaults()
  256         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         256  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         257  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         258  +
            .allow_no_auth()
  257    259   
            .endpoint_url("https://example.com/custom");
  258    260   
  259    261   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  260    262   
        let result = client.host_with_path_operation().send().await;
  261    263   
        let _ = dbg!(result);
  262    264   
        let http_request = request_receiver.expect_request();
  263    265   
        let expected_headers = [
  264    266   
            ("Content-Type", "application/x-amz-json-1.1"),
  265    267   
            ("X-Amz-Target", "JsonProtocol.HostWithPathOperation"),
  266    268   
        ];

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/operation/json_enums.rs

@@ -219,219 +337,341 @@
  239    239   
mod json_enums_test {
  240    240   
  241    241   
    /// Serializes simple scalar properties
  242    242   
    /// Test ID: AwsJson11Enums
  243    243   
    #[::tokio::test]
  244    244   
    #[::tracing_test::traced_test]
  245    245   
    async fn aws_json11_enums_request() {
  246    246   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  247    247   
        let config_builder = crate::config::Config::builder()
  248    248   
            .with_test_defaults()
  249         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         249  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         250  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         251  +
            .allow_no_auth()
  250    252   
            .endpoint_url("https://example.com");
  251    253   
  252    254   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  253    255   
        let result = client
  254    256   
            .json_enums()
  255    257   
            .set_foo_enum1(::std::option::Option::Some(
  256    258   
                "Foo".parse::<crate::types::FooEnum>().expect("static value validated to member"),
  257    259   
            ))
  258    260   
            .set_foo_enum2(::std::option::Option::Some(
  259    261   
                "0".parse::<crate::types::FooEnum>().expect("static value validated to member"),
  260    262   
            ))
  261    263   
            .set_foo_enum3(::std::option::Option::Some(
  262    264   
                "1".parse::<crate::types::FooEnum>().expect("static value validated to member"),
  263    265   
            ))
  264    266   
            .set_foo_enum_list(::std::option::Option::Some(vec![
  265    267   
                "Foo".parse::<crate::types::FooEnum>().expect("static value validated to member"),
  266    268   
                "0".parse::<crate::types::FooEnum>().expect("static value validated to member"),
  267    269   
            ]))
  268    270   
            .set_foo_enum_set(::std::option::Option::Some(vec![
  269    271   
                "Foo".parse::<crate::types::FooEnum>().expect("static value validated to member"),
  270    272   
                "0".parse::<crate::types::FooEnum>().expect("static value validated to member"),
  271    273   
            ]))
  272    274   
            .set_foo_enum_map(::std::option::Option::Some({
  273    275   
                let mut ret = ::std::collections::HashMap::new();
  274    276   
                ret.insert(
  275    277   
                    "hi".to_owned(),
  276    278   
                    "Foo".parse::<crate::types::FooEnum>().expect("static value validated to member"),
  277    279   
                );
  278    280   
                ret.insert(
  279    281   
                    "zero".to_owned(),
  280    282   
                    "0".parse::<crate::types::FooEnum>().expect("static value validated to member"),
  281    283   
                );
  282    284   
                ret
  283    285   
            }))
  284    286   
            .send()
  285    287   
            .await;
  286    288   
        let _ = dbg!(result);
  287    289   
        let http_request = request_receiver.expect_request();
  288    290   
        let expected_headers = [("Content-Type", "application/x-amz-json-1.1"), ("X-Amz-Target", "JsonProtocol.JsonEnums")];
  289    291   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  290    292   
        let body = http_request.body().bytes().expect("body should be strict");
  291    293   
        ::aws_smithy_protocol_test::assert_ok(
  292    294   
        ::aws_smithy_protocol_test::validate_body(body, "{\n    \"fooEnum1\": \"Foo\",\n    \"fooEnum2\": \"0\",\n    \"fooEnum3\": \"1\",\n    \"fooEnumList\": [\n        \"Foo\",\n        \"0\"\n    ],\n    \"fooEnumSet\": [\n        \"Foo\",\n        \"0\"\n    ],\n    \"fooEnumMap\": {\n        \"hi\": \"Foo\",\n        \"zero\": \"0\"\n    }\n}", ::aws_smithy_protocol_test::MediaType::from("application/json"))
  293    295   
        );
  294    296   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  295    297   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  296    298   
        ::pretty_assertions::assert_eq!(uri.path(), "/", "path was incorrect");
  297    299   
    }
  298    300   
  299    301   
    /// Serializes simple scalar properties
  300    302   
    /// Test ID: AwsJson11EnumsBasic
  301    303   
    #[::tokio::test]
  302    304   
    #[::tracing_test::traced_test]
  303    305   
    async fn aws_json11_enums_basic_request() {
  304    306   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  305    307   
        let config_builder = crate::config::Config::builder()
  306    308   
            .with_test_defaults()
  307         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         309  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         310  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         311  +
            .allow_no_auth()
  308    312   
            .endpoint_url("https://example.com");
  309    313   
  310    314   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  311    315   
        let result = client
  312    316   
            .json_enums()
  313    317   
            .set_foo_enum1(::std::option::Option::Some(
  314    318   
                "Foo".parse::<crate::types::FooEnum>().expect("static value validated to member"),
  315    319   
            ))
  316    320   
            .set_foo_enum2(::std::option::Option::Some(
  317    321   
                "0".parse::<crate::types::FooEnum>().expect("static value validated to member"),

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/operation/json_int_enums.rs

@@ -221,221 +281,283 @@
  241    241   
mod json_int_enums_test {
  242    242   
  243    243   
    /// Serializes simple scalar properties
  244    244   
    /// Test ID: AwsJson11IntEnums
  245    245   
    #[::tokio::test]
  246    246   
    #[::tracing_test::traced_test]
  247    247   
    async fn aws_json11_int_enums_request() {
  248    248   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  249    249   
        let config_builder = crate::config::Config::builder()
  250    250   
            .with_test_defaults()
  251         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         251  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         252  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         253  +
            .allow_no_auth()
  252    254   
            .endpoint_url("https://example.com");
  253    255   
  254    256   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  255    257   
        let result = client
  256    258   
            .json_int_enums()
  257    259   
            .set_int_enum1(::std::option::Option::Some(1))
  258    260   
            .set_int_enum2(::std::option::Option::Some(2))
  259    261   
            .set_int_enum3(::std::option::Option::Some(3))
  260    262   
            .set_int_enum_list(::std::option::Option::Some(vec![1, 2]))
  261    263   
            .set_int_enum_set(::std::option::Option::Some(vec![1, 2]))

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/operation/json_unions.rs

@@ -219,219 +573,591 @@
  239    239   
mod json_unions_test {
  240    240   
  241    241   
    /// Serializes a string union value
  242    242   
    /// Test ID: AwsJson11SerializeStringUnionValue
  243    243   
    #[::tokio::test]
  244    244   
    #[::tracing_test::traced_test]
  245    245   
    async fn aws_json11_serialize_string_union_value_request() {
  246    246   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  247    247   
        let config_builder = crate::config::Config::builder()
  248    248   
            .with_test_defaults()
  249         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         249  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         250  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         251  +
            .allow_no_auth()
  250    252   
            .endpoint_url("https://example.com");
  251    253   
  252    254   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  253    255   
        let result = client
  254    256   
            .json_unions()
  255    257   
            .set_contents(::std::option::Option::Some(crate::types::MyUnion::StringValue("foo".to_owned())))
  256    258   
            .send()
  257    259   
            .await;
  258    260   
        let _ = dbg!(result);
  259    261   
        let http_request = request_receiver.expect_request();
  260    262   
        let expected_headers = [
  261    263   
            ("Content-Type", "application/x-amz-json-1.1"),
  262    264   
            ("X-Amz-Target", "JsonProtocol.JsonUnions"),
  263    265   
        ];
  264    266   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  265    267   
        let body = http_request.body().bytes().expect("body should be strict");
  266    268   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
  267    269   
            body,
  268    270   
            "{\n    \"contents\": {\n        \"stringValue\": \"foo\"\n    }\n}",
  269    271   
            ::aws_smithy_protocol_test::MediaType::from("application/json"),
  270    272   
        ));
  271    273   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  272    274   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  273    275   
        ::pretty_assertions::assert_eq!(uri.path(), "/", "path was incorrect");
  274    276   
    }
  275    277   
  276    278   
    /// Serializes a boolean union value
  277    279   
    /// Test ID: AwsJson11SerializeBooleanUnionValue
  278    280   
    #[::tokio::test]
  279    281   
    #[::tracing_test::traced_test]
  280    282   
    async fn aws_json11_serialize_boolean_union_value_request() {
  281    283   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  282    284   
        let config_builder = crate::config::Config::builder()
  283    285   
            .with_test_defaults()
  284         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         286  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         287  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         288  +
            .allow_no_auth()
  285    289   
            .endpoint_url("https://example.com");
  286    290   
  287    291   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  288    292   
        let result = client
  289    293   
            .json_unions()
  290    294   
            .set_contents(::std::option::Option::Some(crate::types::MyUnion::BooleanValue(true)))
  291    295   
            .send()
  292    296   
            .await;
  293    297   
        let _ = dbg!(result);
  294    298   
        let http_request = request_receiver.expect_request();
  295    299   
        let expected_headers = [
  296    300   
            ("Content-Type", "application/x-amz-json-1.1"),
  297    301   
            ("X-Amz-Target", "JsonProtocol.JsonUnions"),
  298    302   
        ];
  299    303   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  300    304   
        let body = http_request.body().bytes().expect("body should be strict");
  301    305   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
  302    306   
            body,
  303    307   
            "{\n    \"contents\": {\n        \"booleanValue\": true\n    }\n}",
  304    308   
            ::aws_smithy_protocol_test::MediaType::from("application/json"),
  305    309   
        ));
  306    310   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  307    311   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  308    312   
        ::pretty_assertions::assert_eq!(uri.path(), "/", "path was incorrect");
  309    313   
    }
  310    314   
  311    315   
    /// Serializes a number union value
  312    316   
    /// Test ID: AwsJson11SerializeNumberUnionValue
  313    317   
    #[::tokio::test]
  314    318   
    #[::tracing_test::traced_test]
  315    319   
    async fn aws_json11_serialize_number_union_value_request() {
  316    320   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  317    321   
        let config_builder = crate::config::Config::builder()
  318    322   
            .with_test_defaults()
  319         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         323  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         324  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         325  +
            .allow_no_auth()
  320    326   
            .endpoint_url("https://example.com");
  321    327   
  322    328   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  323    329   
        let result = client
  324    330   
            .json_unions()
  325    331   
            .set_contents(::std::option::Option::Some(crate::types::MyUnion::NumberValue(1)))
  326    332   
            .send()
  327    333   
            .await;
  328    334   
        let _ = dbg!(result);
  329    335   
        let http_request = request_receiver.expect_request();
  330    336   
        let expected_headers = [
  331    337   
            ("Content-Type", "application/x-amz-json-1.1"),
  332    338   
            ("X-Amz-Target", "JsonProtocol.JsonUnions"),
  333    339   
        ];
  334    340   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  335    341   
        let body = http_request.body().bytes().expect("body should be strict");
  336    342   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
  337    343   
            body,
  338    344   
            "{\n    \"contents\": {\n        \"numberValue\": 1\n    }\n}",
  339    345   
            ::aws_smithy_protocol_test::MediaType::from("application/json"),
  340    346   
        ));
  341    347   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  342    348   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  343    349   
        ::pretty_assertions::assert_eq!(uri.path(), "/", "path was incorrect");
  344    350   
    }
  345    351   
  346    352   
    /// Serializes a blob union value
  347    353   
    /// Test ID: AwsJson11SerializeBlobUnionValue
  348    354   
    #[::tokio::test]
  349    355   
    #[::tracing_test::traced_test]
  350    356   
    async fn aws_json11_serialize_blob_union_value_request() {
  351    357   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  352    358   
        let config_builder = crate::config::Config::builder()
  353    359   
            .with_test_defaults()
  354         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         360  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         361  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         362  +
            .allow_no_auth()
  355    363   
            .endpoint_url("https://example.com");
  356    364   
  357    365   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  358    366   
        let result = client
  359    367   
            .json_unions()
  360    368   
            .set_contents(::std::option::Option::Some(crate::types::MyUnion::BlobValue(
  361    369   
                ::aws_smithy_types::Blob::new("foo"),
  362    370   
            )))
  363    371   
            .send()
  364    372   
            .await;
  365    373   
        let _ = dbg!(result);
  366    374   
        let http_request = request_receiver.expect_request();
  367    375   
        let expected_headers = [
  368    376   
            ("Content-Type", "application/x-amz-json-1.1"),
  369    377   
            ("X-Amz-Target", "JsonProtocol.JsonUnions"),
  370    378   
        ];
  371    379   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  372    380   
        let body = http_request.body().bytes().expect("body should be strict");
  373    381   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
  374    382   
            body,
  375    383   
            "{\n    \"contents\": {\n        \"blobValue\": \"Zm9v\"\n    }\n}",
  376    384   
            ::aws_smithy_protocol_test::MediaType::from("application/json"),
  377    385   
        ));
  378    386   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  379    387   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  380    388   
        ::pretty_assertions::assert_eq!(uri.path(), "/", "path was incorrect");
  381    389   
    }
  382    390   
  383    391   
    /// Serializes a timestamp union value
  384    392   
    /// Test ID: AwsJson11SerializeTimestampUnionValue
  385    393   
    #[::tokio::test]
  386    394   
    #[::tracing_test::traced_test]
  387    395   
    async fn aws_json11_serialize_timestamp_union_value_request() {
  388    396   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  389    397   
        let config_builder = crate::config::Config::builder()
  390    398   
            .with_test_defaults()
  391         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         399  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         400  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         401  +
            .allow_no_auth()
  392    402   
            .endpoint_url("https://example.com");
  393    403   
  394    404   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  395    405   
        let result = client
  396    406   
            .json_unions()
  397    407   
            .set_contents(::std::option::Option::Some(crate::types::MyUnion::TimestampValue(
  398    408   
                ::aws_smithy_types::DateTime::from_fractional_secs(1398796238, 0_f64),
  399    409   
            )))
  400    410   
            .send()
  401    411   
            .await;
  402    412   
        let _ = dbg!(result);
  403    413   
        let http_request = request_receiver.expect_request();
  404    414   
        let expected_headers = [
  405    415   
            ("Content-Type", "application/x-amz-json-1.1"),
  406    416   
            ("X-Amz-Target", "JsonProtocol.JsonUnions"),
  407    417   
        ];
  408    418   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  409    419   
        let body = http_request.body().bytes().expect("body should be strict");
  410    420   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
  411    421   
            body,
  412    422   
            "{\n    \"contents\": {\n        \"timestampValue\": 1398796238\n    }\n}",
  413    423   
            ::aws_smithy_protocol_test::MediaType::from("application/json"),
  414    424   
        ));
  415    425   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  416    426   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  417    427   
        ::pretty_assertions::assert_eq!(uri.path(), "/", "path was incorrect");
  418    428   
    }
  419    429   
  420    430   
    /// Serializes an enum union value
  421    431   
    /// Test ID: AwsJson11SerializeEnumUnionValue
  422    432   
    #[::tokio::test]
  423    433   
    #[::tracing_test::traced_test]
  424    434   
    async fn aws_json11_serialize_enum_union_value_request() {
  425    435   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  426    436   
        let config_builder = crate::config::Config::builder()
  427    437   
            .with_test_defaults()
  428         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         438  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         439  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         440  +
            .allow_no_auth()
  429    441   
            .endpoint_url("https://example.com");
  430    442   
  431    443   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  432    444   
        let result = client
  433    445   
            .json_unions()
  434    446   
            .set_contents(::std::option::Option::Some(crate::types::MyUnion::EnumValue(
  435    447   
                "Foo".parse::<crate::types::FooEnum>().expect("static value validated to member"),
  436    448   
            )))
  437    449   
            .send()
  438    450   
            .await;
  439    451   
        let _ = dbg!(result);
  440    452   
        let http_request = request_receiver.expect_request();
  441    453   
        let expected_headers = [
  442    454   
            ("Content-Type", "application/x-amz-json-1.1"),
  443    455   
            ("X-Amz-Target", "JsonProtocol.JsonUnions"),
  444    456   
        ];
  445    457   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  446    458   
        let body = http_request.body().bytes().expect("body should be strict");
  447    459   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
  448    460   
            body,
  449    461   
            "{\n    \"contents\": {\n        \"enumValue\": \"Foo\"\n    }\n}",
  450    462   
            ::aws_smithy_protocol_test::MediaType::from("application/json"),
  451    463   
        ));
  452    464   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  453    465   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  454    466   
        ::pretty_assertions::assert_eq!(uri.path(), "/", "path was incorrect");
  455    467   
    }
  456    468   
  457    469   
    /// Serializes a list union value
  458    470   
    /// Test ID: AwsJson11SerializeListUnionValue
  459    471   
    #[::tokio::test]
  460    472   
    #[::tracing_test::traced_test]
  461    473   
    async fn aws_json11_serialize_list_union_value_request() {
  462    474   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  463    475   
        let config_builder = crate::config::Config::builder()
  464    476   
            .with_test_defaults()
  465         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         477  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         478  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         479  +
            .allow_no_auth()
  466    480   
            .endpoint_url("https://example.com");
  467    481   
  468    482   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  469    483   
        let result = client
  470    484   
            .json_unions()
  471    485   
            .set_contents(::std::option::Option::Some(crate::types::MyUnion::ListValue(vec![
  472    486   
                "foo".to_owned(),
  473    487   
                "bar".to_owned(),
  474    488   
            ])))
  475    489   
            .send()
  476    490   
            .await;
  477    491   
        let _ = dbg!(result);
  478    492   
        let http_request = request_receiver.expect_request();
  479    493   
        let expected_headers = [
  480    494   
            ("Content-Type", "application/x-amz-json-1.1"),
  481    495   
            ("X-Amz-Target", "JsonProtocol.JsonUnions"),
  482    496   
        ];
  483    497   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  484    498   
        let body = http_request.body().bytes().expect("body should be strict");
  485    499   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
  486    500   
            body,
  487    501   
            "{\n    \"contents\": {\n        \"listValue\": [\"foo\", \"bar\"]\n    }\n}",
  488    502   
            ::aws_smithy_protocol_test::MediaType::from("application/json"),
  489    503   
        ));
  490    504   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  491    505   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  492    506   
        ::pretty_assertions::assert_eq!(uri.path(), "/", "path was incorrect");
  493    507   
    }
  494    508   
  495    509   
    /// Serializes a map union value
  496    510   
    /// Test ID: AwsJson11SerializeMapUnionValue
  497    511   
    #[::tokio::test]
  498    512   
    #[::tracing_test::traced_test]
  499    513   
    async fn aws_json11_serialize_map_union_value_request() {
  500    514   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  501    515   
        let config_builder = crate::config::Config::builder()
  502    516   
            .with_test_defaults()
  503         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         517  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         518  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         519  +
            .allow_no_auth()
  504    520   
            .endpoint_url("https://example.com");
  505    521   
  506    522   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  507    523   
        let result = client
  508    524   
            .json_unions()
  509    525   
            .set_contents(::std::option::Option::Some(crate::types::MyUnion::MapValue({
  510    526   
                let mut ret = ::std::collections::HashMap::new();
  511    527   
                ret.insert("foo".to_owned(), "bar".to_owned());
  512    528   
                ret.insert("spam".to_owned(), "eggs".to_owned());
  513    529   
                ret
  514    530   
            })))
  515    531   
            .send()
  516    532   
            .await;
  517    533   
        let _ = dbg!(result);
  518    534   
        let http_request = request_receiver.expect_request();
  519    535   
        let expected_headers = [
  520    536   
            ("Content-Type", "application/x-amz-json-1.1"),
  521    537   
            ("X-Amz-Target", "JsonProtocol.JsonUnions"),
  522    538   
        ];
  523    539   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  524    540   
        let body = http_request.body().bytes().expect("body should be strict");
  525    541   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
  526    542   
            body,
  527    543   
            "{\n    \"contents\": {\n        \"mapValue\": {\n            \"foo\": \"bar\",\n            \"spam\": \"eggs\"\n        }\n    }\n}",
  528    544   
            ::aws_smithy_protocol_test::MediaType::from("application/json"),
  529    545   
        ));
  530    546   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  531    547   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  532    548   
        ::pretty_assertions::assert_eq!(uri.path(), "/", "path was incorrect");
  533    549   
    }
  534    550   
  535    551   
    /// Serializes a structure union value
  536    552   
    /// Test ID: AwsJson11SerializeStructureUnionValue
  537    553   
    #[::tokio::test]
  538    554   
    #[::tracing_test::traced_test]
  539    555   
    async fn aws_json11_serialize_structure_union_value_request() {
  540    556   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  541    557   
        let config_builder = crate::config::Config::builder()
  542    558   
            .with_test_defaults()
  543         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         559  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         560  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         561  +
            .allow_no_auth()
  544    562   
            .endpoint_url("https://example.com");
  545    563   
  546    564   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  547    565   
        let result = client
  548    566   
            .json_unions()
  549    567   
            .set_contents(::std::option::Option::Some(crate::types::MyUnion::StructureValue(
  550    568   
                crate::types::GreetingStruct::builder()
  551    569   
                    .set_hi(::std::option::Option::Some("hello".to_owned()))
  552    570   
                    .build(),
  553    571   
            )))

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/operation/kitchen_sink_operation.rs

@@ -230,230 +1169,1215 @@
  250    250   
    use ::aws_smithy_protocol_test::FloatEquals;
  251    251   
  252    252   
    /// Serializes string shapes
  253    253   
    /// Test ID: serializes_string_shapes
  254    254   
    #[::tokio::test]
  255    255   
    #[::tracing_test::traced_test]
  256    256   
    async fn serializes_string_shapes_request() {
  257    257   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  258    258   
        let config_builder = crate::config::Config::builder()
  259    259   
            .with_test_defaults()
  260         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         260  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         261  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         262  +
            .allow_no_auth()
  261    263   
            .endpoint_url("https://example.com");
  262    264   
  263    265   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  264    266   
        let result = client
  265    267   
            .kitchen_sink_operation()
  266    268   
            .set_string(::std::option::Option::Some("abc xyz".to_owned()))
  267    269   
            .send()
  268    270   
            .await;
  269    271   
        let _ = dbg!(result);
  270    272   
        let http_request = request_receiver.expect_request();
  271    273   
        let expected_headers = [
  272    274   
            ("Content-Type", "application/x-amz-json-1.1"),
  273    275   
            ("X-Amz-Target", "JsonProtocol.KitchenSinkOperation"),
  274    276   
        ];
  275    277   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  276    278   
        let required_headers = &["Content-Length"];
  277    279   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::require_headers(http_request.headers(), required_headers));
  278    280   
        let body = http_request.body().bytes().expect("body should be strict");
  279    281   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
  280    282   
            body,
  281    283   
            "{\"String\":\"abc xyz\"}",
  282    284   
            ::aws_smithy_protocol_test::MediaType::from("application/json"),
  283    285   
        ));
  284    286   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  285    287   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  286    288   
        ::pretty_assertions::assert_eq!(uri.path(), "/", "path was incorrect");
  287    289   
    }
  288    290   
  289    291   
    /// Serializes string shapes with jsonvalue trait
  290    292   
    /// Test ID: serializes_string_shapes_with_jsonvalue_trait
  291    293   
    #[::tokio::test]
  292    294   
    #[::tracing_test::traced_test]
  293    295   
    async fn serializes_string_shapes_with_jsonvalue_trait_request() {
  294    296   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  295    297   
        let config_builder = crate::config::Config::builder()
  296    298   
            .with_test_defaults()
  297         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         299  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         300  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         301  +
            .allow_no_auth()
  298    302   
            .endpoint_url("https://example.com");
  299    303   
  300    304   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  301    305   
        let result = client.kitchen_sink_operation()
  302    306   
        .set_json_value(
  303    307   
            ::std::option::Option::Some(
  304    308   
                "{\"string\":\"value\",\"number\":1234.5,\"boolTrue\":true,\"boolFalse\":false,\"array\":[1,2,3,4],\"object\":{\"key\":\"value\"},\"null\":null}".to_owned()
  305    309   
            )
  306    310   
        )
  307    311   
        .send().await;
  308    312   
        let _ = dbg!(result);
  309    313   
        let http_request = request_receiver.expect_request();
  310    314   
        let expected_headers = [
  311    315   
            ("Content-Type", "application/x-amz-json-1.1"),
  312    316   
            ("X-Amz-Target", "JsonProtocol.KitchenSinkOperation"),
  313    317   
        ];
  314    318   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  315    319   
        let required_headers = &["Content-Length"];
  316    320   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::require_headers(http_request.headers(), required_headers));
  317    321   
        let body = http_request.body().bytes().expect("body should be strict");
  318    322   
        ::aws_smithy_protocol_test::assert_ok(
  319    323   
        ::aws_smithy_protocol_test::validate_body(body, "{\"JsonValue\":\"{\\\"string\\\":\\\"value\\\",\\\"number\\\":1234.5,\\\"boolTrue\\\":true,\\\"boolFalse\\\":false,\\\"array\\\":[1,2,3,4],\\\"object\\\":{\\\"key\\\":\\\"value\\\"},\\\"null\\\":null}\"}", ::aws_smithy_protocol_test::MediaType::from("application/json"))
  320    324   
        );
  321    325   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  322    326   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  323    327   
        ::pretty_assertions::assert_eq!(uri.path(), "/", "path was incorrect");
  324    328   
    }
  325    329   
  326    330   
    /// Serializes integer shapes
  327    331   
    /// Test ID: serializes_integer_shapes
  328    332   
    #[::tokio::test]
  329    333   
    #[::tracing_test::traced_test]
  330    334   
    async fn serializes_integer_shapes_request() {
  331    335   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  332    336   
        let config_builder = crate::config::Config::builder()
  333    337   
            .with_test_defaults()
  334         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         338  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         339  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         340  +
            .allow_no_auth()
  335    341   
            .endpoint_url("https://example.com");
  336    342   
  337    343   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  338    344   
        let result = client
  339    345   
            .kitchen_sink_operation()
  340    346   
            .set_integer(::std::option::Option::Some(1234))
  341    347   
            .send()
  342    348   
            .await;
  343    349   
        let _ = dbg!(result);
  344    350   
        let http_request = request_receiver.expect_request();
  345    351   
        let expected_headers = [
  346    352   
            ("Content-Type", "application/x-amz-json-1.1"),
  347    353   
            ("X-Amz-Target", "JsonProtocol.KitchenSinkOperation"),
  348    354   
        ];
  349    355   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  350    356   
        let required_headers = &["Content-Length"];
  351    357   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::require_headers(http_request.headers(), required_headers));
  352    358   
        let body = http_request.body().bytes().expect("body should be strict");
  353    359   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
  354    360   
            body,
  355    361   
            "{\"Integer\":1234}",
  356    362   
            ::aws_smithy_protocol_test::MediaType::from("application/json"),
  357    363   
        ));
  358    364   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  359    365   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  360    366   
        ::pretty_assertions::assert_eq!(uri.path(), "/", "path was incorrect");
  361    367   
    }
  362    368   
  363    369   
    /// Serializes long shapes
  364    370   
    /// Test ID: serializes_long_shapes
  365    371   
    #[::tokio::test]
  366    372   
    #[::tracing_test::traced_test]
  367    373   
    async fn serializes_long_shapes_request() {
  368    374   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  369    375   
        let config_builder = crate::config::Config::builder()
  370    376   
            .with_test_defaults()
  371         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         377  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         378  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         379  +
            .allow_no_auth()
  372    380   
            .endpoint_url("https://example.com");
  373    381   
  374    382   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  375    383   
        let result = client
  376    384   
            .kitchen_sink_operation()
  377    385   
            .set_long(::std::option::Option::Some(999999999999))
  378    386   
            .send()
  379    387   
            .await;
  380    388   
        let _ = dbg!(result);
  381    389   
        let http_request = request_receiver.expect_request();
  382    390   
        let expected_headers = [
  383    391   
            ("Content-Type", "application/x-amz-json-1.1"),
  384    392   
            ("X-Amz-Target", "JsonProtocol.KitchenSinkOperation"),
  385    393   
        ];
  386    394   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  387    395   
        let required_headers = &["Content-Length"];
  388    396   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::require_headers(http_request.headers(), required_headers));
  389    397   
        let body = http_request.body().bytes().expect("body should be strict");
  390    398   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
  391    399   
            body,
  392    400   
            "{\"Long\":999999999999}",
  393    401   
            ::aws_smithy_protocol_test::MediaType::from("application/json"),
  394    402   
        ));
  395    403   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  396    404   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  397    405   
        ::pretty_assertions::assert_eq!(uri.path(), "/", "path was incorrect");
  398    406   
    }
  399    407   
  400    408   
    /// Serializes float shapes
  401    409   
    /// Test ID: serializes_float_shapes
  402    410   
    #[::tokio::test]
  403    411   
    #[::tracing_test::traced_test]
  404    412   
    async fn serializes_float_shapes_request() {
  405    413   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  406    414   
        let config_builder = crate::config::Config::builder()
  407    415   
            .with_test_defaults()
  408         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         416  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         417  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         418  +
            .allow_no_auth()
  409    419   
            .endpoint_url("https://example.com");
  410    420   
  411    421   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  412    422   
        let result = client
  413    423   
            .kitchen_sink_operation()
  414    424   
            .set_float(::std::option::Option::Some(1234.5_f32))
  415    425   
            .send()
  416    426   
            .await;
  417    427   
        let _ = dbg!(result);
  418    428   
        let http_request = request_receiver.expect_request();
  419    429   
        let expected_headers = [
  420    430   
            ("Content-Type", "application/x-amz-json-1.1"),
  421    431   
            ("X-Amz-Target", "JsonProtocol.KitchenSinkOperation"),
  422    432   
        ];
  423    433   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  424    434   
        let required_headers = &["Content-Length"];
  425    435   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::require_headers(http_request.headers(), required_headers));
  426    436   
        let body = http_request.body().bytes().expect("body should be strict");
  427    437   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
  428    438   
            body,
  429    439   
            "{\"Float\":1234.5}",
  430    440   
            ::aws_smithy_protocol_test::MediaType::from("application/json"),
  431    441   
        ));
  432    442   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  433    443   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  434    444   
        ::pretty_assertions::assert_eq!(uri.path(), "/", "path was incorrect");
  435    445   
    }
  436    446   
  437    447   
    /// Serializes double shapes
  438    448   
    /// Test ID: serializes_double_shapes
  439    449   
    #[::tokio::test]
  440    450   
    #[::tracing_test::traced_test]
  441    451   
    async fn serializes_double_shapes_request() {
  442    452   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  443    453   
        let config_builder = crate::config::Config::builder()
  444    454   
            .with_test_defaults()
  445         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         455  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         456  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         457  +
            .allow_no_auth()
  446    458   
            .endpoint_url("https://example.com");
  447    459   
  448    460   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  449    461   
        let result = client
  450    462   
            .kitchen_sink_operation()
  451    463   
            .set_double(::std::option::Option::Some(1234.5_f64))
  452    464   
            .send()
  453    465   
            .await;
  454    466   
        let _ = dbg!(result);
  455    467   
        let http_request = request_receiver.expect_request();
  456    468   
        let expected_headers = [
  457    469   
            ("Content-Type", "application/x-amz-json-1.1"),
  458    470   
            ("X-Amz-Target", "JsonProtocol.KitchenSinkOperation"),
  459    471   
        ];
  460    472   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  461    473   
        let required_headers = &["Content-Length"];
  462    474   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::require_headers(http_request.headers(), required_headers));
  463    475   
        let body = http_request.body().bytes().expect("body should be strict");
  464    476   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
  465    477   
            body,
  466    478   
            "{\"Double\":1234.5}",
  467    479   
            ::aws_smithy_protocol_test::MediaType::from("application/json"),
  468    480   
        ));
  469    481   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  470    482   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  471    483   
        ::pretty_assertions::assert_eq!(uri.path(), "/", "path was incorrect");
  472    484   
    }
  473    485   
  474    486   
    /// Serializes blob shapes
  475    487   
    /// Test ID: serializes_blob_shapes
  476    488   
    #[::tokio::test]
  477    489   
    #[::tracing_test::traced_test]
  478    490   
    async fn serializes_blob_shapes_request() {
  479    491   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  480    492   
        let config_builder = crate::config::Config::builder()
  481    493   
            .with_test_defaults()
  482         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         494  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         495  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         496  +
            .allow_no_auth()
  483    497   
            .endpoint_url("https://example.com");
  484    498   
  485    499   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  486    500   
        let result = client
  487    501   
            .kitchen_sink_operation()
  488    502   
            .set_blob(::std::option::Option::Some(::aws_smithy_types::Blob::new("binary-value")))
  489    503   
            .send()
  490    504   
            .await;
  491    505   
        let _ = dbg!(result);
  492    506   
        let http_request = request_receiver.expect_request();
  493    507   
        let expected_headers = [
  494    508   
            ("Content-Type", "application/x-amz-json-1.1"),
  495    509   
            ("X-Amz-Target", "JsonProtocol.KitchenSinkOperation"),
  496    510   
        ];
  497    511   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  498    512   
        let required_headers = &["Content-Length"];
  499    513   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::require_headers(http_request.headers(), required_headers));
  500    514   
        let body = http_request.body().bytes().expect("body should be strict");
  501    515   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
  502    516   
            body,
  503    517   
            "{\"Blob\":\"YmluYXJ5LXZhbHVl\"}",
  504    518   
            ::aws_smithy_protocol_test::MediaType::from("application/json"),
  505    519   
        ));
  506    520   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  507    521   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  508    522   
        ::pretty_assertions::assert_eq!(uri.path(), "/", "path was incorrect");
  509    523   
    }
  510    524   
  511    525   
    /// Serializes boolean shapes (true)
  512    526   
    /// Test ID: serializes_boolean_shapes_true
  513    527   
    #[::tokio::test]
  514    528   
    #[::tracing_test::traced_test]
  515    529   
    async fn serializes_boolean_shapes_true_request() {
  516    530   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  517    531   
        let config_builder = crate::config::Config::builder()
  518    532   
            .with_test_defaults()
  519         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         533  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         534  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         535  +
            .allow_no_auth()
  520    536   
            .endpoint_url("https://example.com");
  521    537   
  522    538   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  523    539   
        let result = client
  524    540   
            .kitchen_sink_operation()
  525    541   
            .set_boolean(::std::option::Option::Some(true))
  526    542   
            .send()
  527    543   
            .await;
  528    544   
        let _ = dbg!(result);
  529    545   
        let http_request = request_receiver.expect_request();
  530    546   
        let expected_headers = [
  531    547   
            ("Content-Type", "application/x-amz-json-1.1"),
  532    548   
            ("X-Amz-Target", "JsonProtocol.KitchenSinkOperation"),
  533    549   
        ];
  534    550   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  535    551   
        let required_headers = &["Content-Length"];
  536    552   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::require_headers(http_request.headers(), required_headers));
  537    553   
        let body = http_request.body().bytes().expect("body should be strict");
  538    554   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
  539    555   
            body,
  540    556   
            "{\"Boolean\":true}",
  541    557   
            ::aws_smithy_protocol_test::MediaType::from("application/json"),
  542    558   
        ));
  543    559   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  544    560   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  545    561   
        ::pretty_assertions::assert_eq!(uri.path(), "/", "path was incorrect");
  546    562   
    }
  547    563   
  548    564   
    /// Serializes boolean shapes (false)
  549    565   
    /// Test ID: serializes_boolean_shapes_false
  550    566   
    #[::tokio::test]
  551    567   
    #[::tracing_test::traced_test]
  552    568   
    async fn serializes_boolean_shapes_false_request() {
  553    569   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  554    570   
        let config_builder = crate::config::Config::builder()
  555    571   
            .with_test_defaults()
  556         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         572  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         573  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         574  +
            .allow_no_auth()
  557    575   
            .endpoint_url("https://example.com");
  558    576   
  559    577   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  560    578   
        let result = client
  561    579   
            .kitchen_sink_operation()
  562    580   
            .set_boolean(::std::option::Option::Some(false))
  563    581   
            .send()
  564    582   
            .await;
  565    583   
        let _ = dbg!(result);
  566    584   
        let http_request = request_receiver.expect_request();
  567    585   
        let expected_headers = [
  568    586   
            ("Content-Type", "application/x-amz-json-1.1"),
  569    587   
            ("X-Amz-Target", "JsonProtocol.KitchenSinkOperation"),
  570    588   
        ];
  571    589   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  572    590   
        let required_headers = &["Content-Length"];
  573    591   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::require_headers(http_request.headers(), required_headers));
  574    592   
        let body = http_request.body().bytes().expect("body should be strict");
  575    593   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
  576    594   
            body,
  577    595   
            "{\"Boolean\":false}",
  578    596   
            ::aws_smithy_protocol_test::MediaType::from("application/json"),
  579    597   
        ));
  580    598   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  581    599   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  582    600   
        ::pretty_assertions::assert_eq!(uri.path(), "/", "path was incorrect");
  583    601   
    }
  584    602   
  585    603   
    /// Serializes timestamp shapes
  586    604   
    /// Test ID: serializes_timestamp_shapes
  587    605   
    #[::tokio::test]
  588    606   
    #[::tracing_test::traced_test]
  589    607   
    async fn serializes_timestamp_shapes_request() {
  590    608   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  591    609   
        let config_builder = crate::config::Config::builder()
  592    610   
            .with_test_defaults()
  593         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         611  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         612  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         613  +
            .allow_no_auth()
  594    614   
            .endpoint_url("https://example.com");
  595    615   
  596    616   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  597    617   
        let result = client
  598    618   
            .kitchen_sink_operation()
  599    619   
            .set_timestamp(::std::option::Option::Some(::aws_smithy_types::DateTime::from_fractional_secs(
  600    620   
                946845296, 0_f64,
  601    621   
            )))
  602    622   
            .send()
  603    623   
            .await;
  604    624   
        let _ = dbg!(result);
  605    625   
        let http_request = request_receiver.expect_request();
  606    626   
        let expected_headers = [
  607    627   
            ("Content-Type", "application/x-amz-json-1.1"),
  608    628   
            ("X-Amz-Target", "JsonProtocol.KitchenSinkOperation"),
  609    629   
        ];
  610    630   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  611    631   
        let required_headers = &["Content-Length"];
  612    632   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::require_headers(http_request.headers(), required_headers));
  613    633   
        let body = http_request.body().bytes().expect("body should be strict");
  614    634   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
  615    635   
            body,
  616    636   
            "{\"Timestamp\":946845296}",
  617    637   
            ::aws_smithy_protocol_test::MediaType::from("application/json"),
  618    638   
        ));
  619    639   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  620    640   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  621    641   
        ::pretty_assertions::assert_eq!(uri.path(), "/", "path was incorrect");
  622    642   
    }
  623    643   
  624    644   
    /// Serializes timestamp shapes with iso8601 timestampFormat
  625    645   
    /// Test ID: serializes_timestamp_shapes_with_iso8601_timestampformat
  626    646   
    #[::tokio::test]
  627    647   
    #[::tracing_test::traced_test]
  628    648   
    async fn serializes_timestamp_shapes_with_iso8601_timestampformat_request() {
  629    649   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  630    650   
        let config_builder = crate::config::Config::builder()
  631    651   
            .with_test_defaults()
  632         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         652  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         653  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         654  +
            .allow_no_auth()
  633    655   
            .endpoint_url("https://example.com");
  634    656   
  635    657   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  636    658   
        let result = client
  637    659   
            .kitchen_sink_operation()
  638    660   
            .set_iso8601_timestamp(::std::option::Option::Some(::aws_smithy_types::DateTime::from_fractional_secs(
  639    661   
                946845296, 0_f64,
  640    662   
            )))
  641    663   
            .send()
  642    664   
            .await;
  643    665   
        let _ = dbg!(result);
  644    666   
        let http_request = request_receiver.expect_request();
  645    667   
        let expected_headers = [
  646    668   
            ("Content-Type", "application/x-amz-json-1.1"),
  647    669   
            ("X-Amz-Target", "JsonProtocol.KitchenSinkOperation"),
  648    670   
        ];
  649    671   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  650    672   
        let required_headers = &["Content-Length"];
  651    673   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::require_headers(http_request.headers(), required_headers));
  652    674   
        let body = http_request.body().bytes().expect("body should be strict");
  653    675   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
  654    676   
            body,
  655    677   
            "{\"Iso8601Timestamp\":\"2000-01-02T20:34:56Z\"}",
  656    678   
            ::aws_smithy_protocol_test::MediaType::from("application/json"),
  657    679   
        ));
  658    680   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  659    681   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  660    682   
        ::pretty_assertions::assert_eq!(uri.path(), "/", "path was incorrect");
  661    683   
    }
  662    684   
  663    685   
    /// Serializes timestamp shapes with httpdate timestampFormat
  664    686   
    /// Test ID: serializes_timestamp_shapes_with_httpdate_timestampformat
  665    687   
    #[::tokio::test]
  666    688   
    #[::tracing_test::traced_test]
  667    689   
    async fn serializes_timestamp_shapes_with_httpdate_timestampformat_request() {
  668    690   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  669    691   
        let config_builder = crate::config::Config::builder()
  670    692   
            .with_test_defaults()
  671         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         693  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         694  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         695  +
            .allow_no_auth()
  672    696   
            .endpoint_url("https://example.com");
  673    697   
  674    698   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  675    699   
        let result = client
  676    700   
            .kitchen_sink_operation()
  677    701   
            .set_httpdate_timestamp(::std::option::Option::Some(::aws_smithy_types::DateTime::from_fractional_secs(
  678    702   
                946845296, 0_f64,
  679    703   
            )))
  680    704   
            .send()
  681    705   
            .await;
  682    706   
        let _ = dbg!(result);
  683    707   
        let http_request = request_receiver.expect_request();
  684    708   
        let expected_headers = [
  685    709   
            ("Content-Type", "application/x-amz-json-1.1"),
  686    710   
            ("X-Amz-Target", "JsonProtocol.KitchenSinkOperation"),
  687    711   
        ];
  688    712   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  689    713   
        let required_headers = &["Content-Length"];
  690    714   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::require_headers(http_request.headers(), required_headers));
  691    715   
        let body = http_request.body().bytes().expect("body should be strict");
  692    716   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
  693    717   
            body,
  694    718   
            "{\"HttpdateTimestamp\":\"Sun, 02 Jan 2000 20:34:56 GMT\"}",
  695    719   
            ::aws_smithy_protocol_test::MediaType::from("application/json"),
  696    720   
        ));
  697    721   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  698    722   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  699    723   
        ::pretty_assertions::assert_eq!(uri.path(), "/", "path was incorrect");
  700    724   
    }
  701    725   
  702    726   
    /// Serializes timestamp shapes with unixTimestamp timestampFormat
  703    727   
    /// Test ID: serializes_timestamp_shapes_with_unixtimestamp_timestampformat
  704    728   
    #[::tokio::test]
  705    729   
    #[::tracing_test::traced_test]
  706    730   
    async fn serializes_timestamp_shapes_with_unixtimestamp_timestampformat_request() {
  707    731   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  708    732   
        let config_builder = crate::config::Config::builder()
  709    733   
            .with_test_defaults()
  710         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         734  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         735  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         736  +
            .allow_no_auth()
  711    737   
            .endpoint_url("https://example.com");
  712    738   
  713    739   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  714    740   
        let result = client
  715    741   
            .kitchen_sink_operation()
  716    742   
            .set_unix_timestamp(::std::option::Option::Some(::aws_smithy_types::DateTime::from_fractional_secs(
  717    743   
                946845296, 0_f64,
  718    744   
            )))
  719    745   
            .send()
  720    746   
            .await;
  721    747   
        let _ = dbg!(result);
  722    748   
        let http_request = request_receiver.expect_request();
  723    749   
        let expected_headers = [
  724    750   
            ("Content-Type", "application/x-amz-json-1.1"),
  725    751   
            ("X-Amz-Target", "JsonProtocol.KitchenSinkOperation"),
  726    752   
        ];
  727    753   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  728    754   
        let required_headers = &["Content-Length"];
  729    755   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::require_headers(http_request.headers(), required_headers));
  730    756   
        let body = http_request.body().bytes().expect("body should be strict");
  731    757   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
  732    758   
            body,
  733    759   
            "{\"UnixTimestamp\":946845296}",
  734    760   
            ::aws_smithy_protocol_test::MediaType::from("application/json"),
  735    761   
        ));
  736    762   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  737    763   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  738    764   
        ::pretty_assertions::assert_eq!(uri.path(), "/", "path was incorrect");
  739    765   
    }
  740    766   
  741    767   
    /// Serializes list shapes
  742    768   
    /// Test ID: serializes_list_shapes
  743    769   
    #[::tokio::test]
  744    770   
    #[::tracing_test::traced_test]
  745    771   
    async fn serializes_list_shapes_request() {
  746    772   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  747    773   
        let config_builder = crate::config::Config::builder()
  748    774   
            .with_test_defaults()
  749         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         775  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         776  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         777  +
            .allow_no_auth()
  750    778   
            .endpoint_url("https://example.com");
  751    779   
  752    780   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  753    781   
        let result = client
  754    782   
            .kitchen_sink_operation()
  755    783   
            .set_list_of_strings(::std::option::Option::Some(vec!["abc".to_owned(), "mno".to_owned(), "xyz".to_owned()]))
  756    784   
            .send()
  757    785   
            .await;
  758    786   
        let _ = dbg!(result);
  759    787   
        let http_request = request_receiver.expect_request();
  760    788   
        let expected_headers = [
  761    789   
            ("Content-Type", "application/x-amz-json-1.1"),
  762    790   
            ("X-Amz-Target", "JsonProtocol.KitchenSinkOperation"),
  763    791   
        ];
  764    792   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  765    793   
        let required_headers = &["Content-Length"];
  766    794   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::require_headers(http_request.headers(), required_headers));
  767    795   
        let body = http_request.body().bytes().expect("body should be strict");
  768    796   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
  769    797   
            body,
  770    798   
            "{\"ListOfStrings\":[\"abc\",\"mno\",\"xyz\"]}",
  771    799   
            ::aws_smithy_protocol_test::MediaType::from("application/json"),
  772    800   
        ));
  773    801   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  774    802   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  775    803   
        ::pretty_assertions::assert_eq!(uri.path(), "/", "path was incorrect");
  776    804   
    }
  777    805   
  778    806   
    /// Serializes empty list shapes
  779    807   
    /// Test ID: serializes_empty_list_shapes
  780    808   
    #[::tokio::test]
  781    809   
    #[::tracing_test::traced_test]
  782    810   
    async fn serializes_empty_list_shapes_request() {
  783    811   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  784    812   
        let config_builder = crate::config::Config::builder()
  785    813   
            .with_test_defaults()
  786         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         814  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         815  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         816  +
            .allow_no_auth()
  787    817   
            .endpoint_url("https://example.com");
  788    818   
  789    819   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  790    820   
        let result = client
  791    821   
            .kitchen_sink_operation()
  792    822   
            .set_list_of_strings(::std::option::Option::Some(vec![]))
  793    823   
            .send()
  794    824   
            .await;
  795    825   
        let _ = dbg!(result);
  796    826   
        let http_request = request_receiver.expect_request();
  797    827   
        let expected_headers = [
  798    828   
            ("Content-Type", "application/x-amz-json-1.1"),
  799    829   
            ("X-Amz-Target", "JsonProtocol.KitchenSinkOperation"),
  800    830   
        ];
  801    831   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  802    832   
        let required_headers = &["Content-Length"];
  803    833   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::require_headers(http_request.headers(), required_headers));
  804    834   
        let body = http_request.body().bytes().expect("body should be strict");
  805    835   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
  806    836   
            body,
  807    837   
            "{\"ListOfStrings\":[]}",
  808    838   
            ::aws_smithy_protocol_test::MediaType::from("application/json"),
  809    839   
        ));
  810    840   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  811    841   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  812    842   
        ::pretty_assertions::assert_eq!(uri.path(), "/", "path was incorrect");
  813    843   
    }
  814    844   
  815    845   
    /// Serializes list of map shapes
  816    846   
    /// Test ID: serializes_list_of_map_shapes
  817    847   
    #[::tokio::test]
  818    848   
    #[::tracing_test::traced_test]
  819    849   
    async fn serializes_list_of_map_shapes_request() {
  820    850   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  821    851   
        let config_builder = crate::config::Config::builder()
  822    852   
            .with_test_defaults()
  823         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         853  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         854  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         855  +
            .allow_no_auth()
  824    856   
            .endpoint_url("https://example.com");
  825    857   
  826    858   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  827    859   
        let result = client
  828    860   
            .kitchen_sink_operation()
  829    861   
            .set_list_of_maps_of_strings(::std::option::Option::Some(vec![
  830    862   
                {
  831    863   
                    let mut ret = ::std::collections::HashMap::new();
  832    864   
                    ret.insert("foo".to_owned(), "bar".to_owned());
  833    865   
                    ret
  834    866   
                },
  835    867   
                {
  836    868   
                    let mut ret = ::std::collections::HashMap::new();
  837    869   
                    ret.insert("abc".to_owned(), "xyz".to_owned());
  838    870   
                    ret
  839    871   
                },
  840    872   
                {
  841    873   
                    let mut ret = ::std::collections::HashMap::new();
  842    874   
                    ret.insert("red".to_owned(), "blue".to_owned());
  843    875   
                    ret
  844    876   
                },
  845    877   
            ]))
  846    878   
            .send()
  847    879   
            .await;
  848    880   
        let _ = dbg!(result);
  849    881   
        let http_request = request_receiver.expect_request();
  850    882   
        let expected_headers = [
  851    883   
            ("Content-Type", "application/x-amz-json-1.1"),
  852    884   
            ("X-Amz-Target", "JsonProtocol.KitchenSinkOperation"),
  853    885   
        ];
  854    886   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  855    887   
        let required_headers = &["Content-Length"];
  856    888   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::require_headers(http_request.headers(), required_headers));
  857    889   
        let body = http_request.body().bytes().expect("body should be strict");
  858    890   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
  859    891   
            body,
  860    892   
            "{\"ListOfMapsOfStrings\":[{\"foo\":\"bar\"},{\"abc\":\"xyz\"},{\"red\":\"blue\"}]}",
  861    893   
            ::aws_smithy_protocol_test::MediaType::from("application/json"),
  862    894   
        ));
  863    895   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  864    896   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  865    897   
        ::pretty_assertions::assert_eq!(uri.path(), "/", "path was incorrect");
  866    898   
    }
  867    899   
  868    900   
    /// Serializes list of structure shapes
  869    901   
    /// Test ID: serializes_list_of_structure_shapes
  870    902   
    #[::tokio::test]
  871    903   
    #[::tracing_test::traced_test]
  872    904   
    async fn serializes_list_of_structure_shapes_request() {
  873    905   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  874    906   
        let config_builder = crate::config::Config::builder()
  875    907   
            .with_test_defaults()
  876         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         908  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         909  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         910  +
            .allow_no_auth()
  877    911   
            .endpoint_url("https://example.com");
  878    912   
  879    913   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  880    914   
        let result = client
  881    915   
            .kitchen_sink_operation()
  882    916   
            .set_list_of_structs(::std::option::Option::Some(vec![
  883    917   
                crate::types::SimpleStruct::builder()
  884    918   
                    .set_value(::std::option::Option::Some("abc".to_owned()))
  885    919   
                    .build(),
  886    920   
                crate::types::SimpleStruct::builder()
  887    921   
                    .set_value(::std::option::Option::Some("mno".to_owned()))
  888    922   
                    .build(),
  889    923   
                crate::types::SimpleStruct::builder()
  890    924   
                    .set_value(::std::option::Option::Some("xyz".to_owned()))
  891    925   
                    .build(),
  892    926   
            ]))
  893    927   
            .send()
  894    928   
            .await;
  895    929   
        let _ = dbg!(result);
  896    930   
        let http_request = request_receiver.expect_request();
  897    931   
        let expected_headers = [
  898    932   
            ("Content-Type", "application/x-amz-json-1.1"),
  899    933   
            ("X-Amz-Target", "JsonProtocol.KitchenSinkOperation"),
  900    934   
        ];
  901    935   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  902    936   
        let required_headers = &["Content-Length"];
  903    937   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::require_headers(http_request.headers(), required_headers));
  904    938   
        let body = http_request.body().bytes().expect("body should be strict");
  905    939   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
  906    940   
            body,
  907    941   
            "{\"ListOfStructs\":[{\"Value\":\"abc\"},{\"Value\":\"mno\"},{\"Value\":\"xyz\"}]}",
  908    942   
            ::aws_smithy_protocol_test::MediaType::from("application/json"),
  909    943   
        ));
  910    944   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  911    945   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  912    946   
        ::pretty_assertions::assert_eq!(uri.path(), "/", "path was incorrect");
  913    947   
    }
  914    948   
  915    949   
    /// Serializes list of recursive structure shapes
  916    950   
    /// Test ID: serializes_list_of_recursive_structure_shapes
  917    951   
    #[::tokio::test]
  918    952   
    #[::tracing_test::traced_test]
  919    953   
    async fn serializes_list_of_recursive_structure_shapes_request() {
  920    954   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  921    955   
        let config_builder = crate::config::Config::builder()
  922    956   
            .with_test_defaults()
  923         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         957  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         958  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         959  +
            .allow_no_auth()
  924    960   
            .endpoint_url("https://example.com");
  925    961   
  926    962   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  927    963   
        let result = client
  928    964   
            .kitchen_sink_operation()
  929    965   
            .set_recursive_list(::std::option::Option::Some(vec![crate::types::KitchenSink::builder()
  930    966   
                .set_recursive_list(::std::option::Option::Some(vec![crate::types::KitchenSink::builder()
  931    967   
                    .set_recursive_list(::std::option::Option::Some(vec![crate::types::KitchenSink::builder()
  932    968   
                        .set_integer(::std::option::Option::Some(123))
  933    969   
                        .build()]))
  934    970   
                    .build()]))
  935    971   
                .build()]))
  936    972   
            .send()
  937    973   
            .await;
  938    974   
        let _ = dbg!(result);
  939    975   
        let http_request = request_receiver.expect_request();
  940    976   
        let expected_headers = [
  941    977   
            ("Content-Type", "application/x-amz-json-1.1"),
  942    978   
            ("X-Amz-Target", "JsonProtocol.KitchenSinkOperation"),
  943    979   
        ];
  944    980   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  945    981   
        let required_headers = &["Content-Length"];
  946    982   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::require_headers(http_request.headers(), required_headers));
  947    983   
        let body = http_request.body().bytes().expect("body should be strict");
  948    984   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
  949    985   
            body,
  950    986   
            "{\"RecursiveList\":[{\"RecursiveList\":[{\"RecursiveList\":[{\"Integer\":123}]}]}]}",
  951    987   
            ::aws_smithy_protocol_test::MediaType::from("application/json"),
  952    988   
        ));
  953    989   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  954    990   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  955    991   
        ::pretty_assertions::assert_eq!(uri.path(), "/", "path was incorrect");
  956    992   
    }
  957    993   
  958    994   
    /// Serializes map shapes
  959    995   
    /// Test ID: serializes_map_shapes
  960    996   
    #[::tokio::test]
  961    997   
    #[::tracing_test::traced_test]
  962    998   
    async fn serializes_map_shapes_request() {
  963    999   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  964   1000   
        let config_builder = crate::config::Config::builder()
  965   1001   
            .with_test_defaults()
  966         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
        1002  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
        1003  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
        1004  +
            .allow_no_auth()
  967   1005   
            .endpoint_url("https://example.com");
  968   1006   
  969   1007   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  970   1008   
        let result = client
  971   1009   
            .kitchen_sink_operation()
  972   1010   
            .set_map_of_strings(::std::option::Option::Some({
  973   1011   
                let mut ret = ::std::collections::HashMap::new();
  974   1012   
                ret.insert("abc".to_owned(), "xyz".to_owned());
  975   1013   
                ret.insert("mno".to_owned(), "hjk".to_owned());
  976   1014   
                ret
  977   1015   
            }))
  978   1016   
            .send()
  979   1017   
            .await;
  980   1018   
        let _ = dbg!(result);
  981   1019   
        let http_request = request_receiver.expect_request();
  982   1020   
        let expected_headers = [
  983   1021   
            ("Content-Type", "application/x-amz-json-1.1"),
  984   1022   
            ("X-Amz-Target", "JsonProtocol.KitchenSinkOperation"),
  985   1023   
        ];
  986   1024   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  987   1025   
        let required_headers = &["Content-Length"];
  988   1026   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::require_headers(http_request.headers(), required_headers));
  989   1027   
        let body = http_request.body().bytes().expect("body should be strict");
  990   1028   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
  991   1029   
            body,
  992   1030   
            "{\"MapOfStrings\":{\"abc\":\"xyz\",\"mno\":\"hjk\"}}",
  993   1031   
            ::aws_smithy_protocol_test::MediaType::from("application/json"),
  994   1032   
        ));
  995   1033   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  996   1034   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  997   1035   
        ::pretty_assertions::assert_eq!(uri.path(), "/", "path was incorrect");
  998   1036   
    }
  999   1037   
 1000   1038   
    /// Serializes empty map shapes
 1001   1039   
    /// Test ID: serializes_empty_map_shapes
 1002   1040   
    #[::tokio::test]
 1003   1041   
    #[::tracing_test::traced_test]
 1004   1042   
    async fn serializes_empty_map_shapes_request() {
 1005   1043   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
 1006   1044   
        let config_builder = crate::config::Config::builder()
 1007   1045   
            .with_test_defaults()
 1008         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
        1046  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
        1047  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
        1048  +
            .allow_no_auth()
 1009   1049   
            .endpoint_url("https://example.com");
 1010   1050   
 1011   1051   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
 1012   1052   
        let result = client
 1013   1053   
            .kitchen_sink_operation()
 1014   1054   
            .set_map_of_strings(::std::option::Option::Some(::std::collections::HashMap::new()))
 1015   1055   
            .send()
 1016   1056   
            .await;
 1017   1057   
        let _ = dbg!(result);
 1018   1058   
        let http_request = request_receiver.expect_request();
 1019   1059   
        let expected_headers = [
 1020   1060   
            ("Content-Type", "application/x-amz-json-1.1"),
 1021   1061   
            ("X-Amz-Target", "JsonProtocol.KitchenSinkOperation"),
 1022   1062   
        ];
 1023   1063   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
 1024   1064   
        let required_headers = &["Content-Length"];
 1025   1065   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::require_headers(http_request.headers(), required_headers));
 1026   1066   
        let body = http_request.body().bytes().expect("body should be strict");
 1027   1067   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
 1028   1068   
            body,
 1029   1069   
            "{\"MapOfStrings\":{}}",
 1030   1070   
            ::aws_smithy_protocol_test::MediaType::from("application/json"),
 1031   1071   
        ));
 1032   1072   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
 1033   1073   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
 1034   1074   
        ::pretty_assertions::assert_eq!(uri.path(), "/", "path was incorrect");
 1035   1075   
    }
 1036   1076   
 1037   1077   
    /// Serializes map of list shapes
 1038   1078   
    /// Test ID: serializes_map_of_list_shapes
 1039   1079   
    #[::tokio::test]
 1040   1080   
    #[::tracing_test::traced_test]
 1041   1081   
    async fn serializes_map_of_list_shapes_request() {
 1042   1082   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
 1043   1083   
        let config_builder = crate::config::Config::builder()
 1044   1084   
            .with_test_defaults()
 1045         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
        1085  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
        1086  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
        1087  +
            .allow_no_auth()
 1046   1088   
            .endpoint_url("https://example.com");
 1047   1089   
 1048   1090   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
 1049   1091   
        let result = client
 1050   1092   
            .kitchen_sink_operation()
 1051   1093   
            .set_map_of_lists_of_strings(::std::option::Option::Some({
 1052   1094   
                let mut ret = ::std::collections::HashMap::new();
 1053   1095   
                ret.insert("abc".to_owned(), vec!["abc".to_owned(), "xyz".to_owned()]);
 1054   1096   
                ret.insert("mno".to_owned(), vec!["xyz".to_owned(), "abc".to_owned()]);
 1055   1097   
                ret
 1056   1098   
            }))
 1057   1099   
            .send()
 1058   1100   
            .await;
 1059   1101   
        let _ = dbg!(result);
 1060   1102   
        let http_request = request_receiver.expect_request();
 1061   1103   
        let expected_headers = [
 1062   1104   
            ("Content-Type", "application/x-amz-json-1.1"),
 1063   1105   
            ("X-Amz-Target", "JsonProtocol.KitchenSinkOperation"),
 1064   1106   
        ];
 1065   1107   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
 1066   1108   
        let required_headers = &["Content-Length"];
 1067   1109   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::require_headers(http_request.headers(), required_headers));
 1068   1110   
        let body = http_request.body().bytes().expect("body should be strict");
 1069   1111   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
 1070   1112   
            body,
 1071   1113   
            "{\"MapOfListsOfStrings\":{\"abc\":[\"abc\",\"xyz\"],\"mno\":[\"xyz\",\"abc\"]}}",
 1072   1114   
            ::aws_smithy_protocol_test::MediaType::from("application/json"),
 1073   1115   
        ));
 1074   1116   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
 1075   1117   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
 1076   1118   
        ::pretty_assertions::assert_eq!(uri.path(), "/", "path was incorrect");
 1077   1119   
    }
 1078   1120   
 1079   1121   
    /// Serializes map of structure shapes
 1080   1122   
    /// Test ID: serializes_map_of_structure_shapes
 1081   1123   
    #[::tokio::test]
 1082   1124   
    #[::tracing_test::traced_test]
 1083   1125   
    async fn serializes_map_of_structure_shapes_request() {
 1084   1126   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
 1085   1127   
        let config_builder = crate::config::Config::builder()
 1086   1128   
            .with_test_defaults()
 1087         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
        1129  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
        1130  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
        1131  +
            .allow_no_auth()
 1088   1132   
            .endpoint_url("https://example.com");
 1089   1133   
 1090   1134   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
 1091   1135   
        let result = client
 1092   1136   
            .kitchen_sink_operation()
 1093   1137   
            .set_map_of_structs(::std::option::Option::Some({
 1094   1138   
                let mut ret = ::std::collections::HashMap::new();
 1095   1139   
                ret.insert(
 1096   1140   
                    "key1".to_owned(),
 1097   1141   
                    crate::types::SimpleStruct::builder()
 1098   1142   
                        .set_value(::std::option::Option::Some("value-1".to_owned()))
 1099   1143   
                        .build(),
 1100   1144   
                );
 1101   1145   
                ret.insert(
 1102   1146   
                    "key2".to_owned(),
 1103   1147   
                    crate::types::SimpleStruct::builder()
 1104   1148   
                        .set_value(::std::option::Option::Some("value-2".to_owned()))
 1105   1149   
                        .build(),
 1106   1150   
                );
 1107   1151   
                ret
 1108   1152   
            }))
 1109   1153   
            .send()
 1110   1154   
            .await;
 1111   1155   
        let _ = dbg!(result);
 1112   1156   
        let http_request = request_receiver.expect_request();
 1113   1157   
        let expected_headers = [
 1114   1158   
            ("Content-Type", "application/x-amz-json-1.1"),
 1115   1159   
            ("X-Amz-Target", "JsonProtocol.KitchenSinkOperation"),
 1116   1160   
        ];
 1117   1161   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
 1118   1162   
        let required_headers = &["Content-Length"];
 1119   1163   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::require_headers(http_request.headers(), required_headers));
 1120   1164   
        let body = http_request.body().bytes().expect("body should be strict");
 1121   1165   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
 1122   1166   
            body,
 1123   1167   
            "{\"MapOfStructs\":{\"key1\":{\"Value\":\"value-1\"},\"key2\":{\"Value\":\"value-2\"}}}",
 1124   1168   
            ::aws_smithy_protocol_test::MediaType::from("application/json"),
 1125   1169   
        ));
 1126   1170   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
 1127   1171   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
 1128   1172   
        ::pretty_assertions::assert_eq!(uri.path(), "/", "path was incorrect");
 1129   1173   
    }
 1130   1174   
 1131   1175   
    /// Serializes map of recursive structure shapes
 1132   1176   
    /// Test ID: serializes_map_of_recursive_structure_shapes
 1133   1177   
    #[::tokio::test]
 1134   1178   
    #[::tracing_test::traced_test]
 1135   1179   
    async fn serializes_map_of_recursive_structure_shapes_request() {
 1136   1180   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
 1137   1181   
        let config_builder = crate::config::Config::builder()
 1138   1182   
            .with_test_defaults()
 1139         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
        1183  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
        1184  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
        1185  +
            .allow_no_auth()
 1140   1186   
            .endpoint_url("https://example.com");
 1141   1187   
 1142   1188   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
 1143   1189   
        let result = client
 1144   1190   
            .kitchen_sink_operation()
 1145   1191   
            .set_recursive_map(::std::option::Option::Some({
 1146   1192   
                let mut ret = ::std::collections::HashMap::new();
 1147   1193   
                ret.insert(
 1148   1194   
                    "key1".to_owned(),
 1149   1195   
                    crate::types::KitchenSink::builder()
@@ -1173,1219 +1389,1445 @@
 1193   1239   
    }
 1194   1240   
 1195   1241   
    /// Serializes structure shapes
 1196   1242   
    /// Test ID: serializes_structure_shapes
 1197   1243   
    #[::tokio::test]
 1198   1244   
    #[::tracing_test::traced_test]
 1199   1245   
    async fn serializes_structure_shapes_request() {
 1200   1246   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
 1201   1247   
        let config_builder = crate::config::Config::builder()
 1202   1248   
            .with_test_defaults()
 1203         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
        1249  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
        1250  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
        1251  +
            .allow_no_auth()
 1204   1252   
            .endpoint_url("https://example.com");
 1205   1253   
 1206   1254   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
 1207   1255   
        let result = client
 1208   1256   
            .kitchen_sink_operation()
 1209   1257   
            .set_simple_struct(::std::option::Option::Some(
 1210   1258   
                crate::types::SimpleStruct::builder()
 1211   1259   
                    .set_value(::std::option::Option::Some("abc".to_owned()))
 1212   1260   
                    .build(),
 1213   1261   
            ))
 1214   1262   
            .send()
 1215   1263   
            .await;
 1216   1264   
        let _ = dbg!(result);
 1217   1265   
        let http_request = request_receiver.expect_request();
 1218   1266   
        let expected_headers = [
 1219   1267   
            ("Content-Type", "application/x-amz-json-1.1"),
 1220   1268   
            ("X-Amz-Target", "JsonProtocol.KitchenSinkOperation"),
 1221   1269   
        ];
 1222   1270   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
 1223   1271   
        let required_headers = &["Content-Length"];
 1224   1272   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::require_headers(http_request.headers(), required_headers));
 1225   1273   
        let body = http_request.body().bytes().expect("body should be strict");
 1226   1274   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
 1227   1275   
            body,
 1228   1276   
            "{\"SimpleStruct\":{\"Value\":\"abc\"}}",
 1229   1277   
            ::aws_smithy_protocol_test::MediaType::from("application/json"),
 1230   1278   
        ));
 1231   1279   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
 1232   1280   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
 1233   1281   
        ::pretty_assertions::assert_eq!(uri.path(), "/", "path was incorrect");
 1234   1282   
    }
 1235   1283   
 1236   1284   
    /// Serializes structure members with locationName traits
 1237   1285   
    /// Test ID: serializes_structure_members_with_locationname_traits
 1238   1286   
    #[::tokio::test]
 1239   1287   
    #[::tracing_test::traced_test]
 1240   1288   
    async fn serializes_structure_members_with_locationname_traits_request() {
 1241   1289   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
 1242   1290   
        let config_builder = crate::config::Config::builder()
 1243   1291   
            .with_test_defaults()
 1244         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
        1292  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
        1293  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
        1294  +
            .allow_no_auth()
 1245   1295   
            .endpoint_url("https://example.com");
 1246   1296   
 1247   1297   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
 1248   1298   
        let result = client
 1249   1299   
            .kitchen_sink_operation()
 1250   1300   
            .set_struct_with_json_name(::std::option::Option::Some(
 1251   1301   
                crate::types::StructWithJsonName::builder()
 1252   1302   
                    .set_value(::std::option::Option::Some("some-value".to_owned()))
 1253   1303   
                    .build(),
 1254   1304   
            ))
 1255   1305   
            .send()
 1256   1306   
            .await;
 1257   1307   
        let _ = dbg!(result);
 1258   1308   
        let http_request = request_receiver.expect_request();
 1259   1309   
        let expected_headers = [
 1260   1310   
            ("Content-Type", "application/x-amz-json-1.1"),
 1261   1311   
            ("X-Amz-Target", "JsonProtocol.KitchenSinkOperation"),
 1262   1312   
        ];
 1263   1313   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
 1264   1314   
        let required_headers = &["Content-Length"];
 1265   1315   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::require_headers(http_request.headers(), required_headers));
 1266   1316   
        let body = http_request.body().bytes().expect("body should be strict");
 1267   1317   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
 1268   1318   
            body,
 1269   1319   
            "{\"StructWithJsonName\":{\"Value\":\"some-value\"}}",
 1270   1320   
            ::aws_smithy_protocol_test::MediaType::from("application/json"),
 1271   1321   
        ));
 1272   1322   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
 1273   1323   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
 1274   1324   
        ::pretty_assertions::assert_eq!(uri.path(), "/", "path was incorrect");
 1275   1325   
    }
 1276   1326   
 1277   1327   
    /// Serializes empty structure shapes
 1278   1328   
    /// Test ID: serializes_empty_structure_shapes
 1279   1329   
    #[::tokio::test]
 1280   1330   
    #[::tracing_test::traced_test]
 1281   1331   
    async fn serializes_empty_structure_shapes_request() {
 1282   1332   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
 1283   1333   
        let config_builder = crate::config::Config::builder()
 1284   1334   
            .with_test_defaults()
 1285         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
        1335  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
        1336  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
        1337  +
            .allow_no_auth()
 1286   1338   
            .endpoint_url("https://example.com");
 1287   1339   
 1288   1340   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
 1289   1341   
        let result = client
 1290   1342   
            .kitchen_sink_operation()
 1291   1343   
            .set_simple_struct(::std::option::Option::Some(crate::types::SimpleStruct::builder().build()))
 1292   1344   
            .send()
 1293   1345   
            .await;
 1294   1346   
        let _ = dbg!(result);
 1295   1347   
        let http_request = request_receiver.expect_request();
 1296   1348   
        let expected_headers = [
 1297   1349   
            ("Content-Type", "application/x-amz-json-1.1"),
 1298   1350   
            ("X-Amz-Target", "JsonProtocol.KitchenSinkOperation"),
 1299   1351   
        ];
 1300   1352   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
 1301   1353   
        let required_headers = &["Content-Length"];
 1302   1354   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::require_headers(http_request.headers(), required_headers));
 1303   1355   
        let body = http_request.body().bytes().expect("body should be strict");
 1304   1356   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
 1305   1357   
            body,
 1306   1358   
            "{\"SimpleStruct\":{}}",
 1307   1359   
            ::aws_smithy_protocol_test::MediaType::from("application/json"),
 1308   1360   
        ));
 1309   1361   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
 1310   1362   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
 1311   1363   
        ::pretty_assertions::assert_eq!(uri.path(), "/", "path was incorrect");
 1312   1364   
    }
 1313   1365   
 1314   1366   
    /// Serializes structure which have no members
 1315   1367   
    /// Test ID: serializes_structure_which_have_no_members
 1316   1368   
    #[::tokio::test]
 1317   1369   
    #[::tracing_test::traced_test]
 1318   1370   
    async fn serializes_structure_which_have_no_members_request() {
 1319   1371   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
 1320   1372   
        let config_builder = crate::config::Config::builder()
 1321   1373   
            .with_test_defaults()
 1322         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
        1374  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
        1375  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
        1376  +
            .allow_no_auth()
 1323   1377   
            .endpoint_url("https://example.com");
 1324   1378   
 1325   1379   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
 1326   1380   
        let result = client
 1327   1381   
            .kitchen_sink_operation()
 1328   1382   
            .set_empty_struct(::std::option::Option::Some(crate::types::EmptyStruct::builder().build()))
 1329   1383   
            .send()
 1330   1384   
            .await;
 1331   1385   
        let _ = dbg!(result);
 1332   1386   
        let http_request = request_receiver.expect_request();
 1333   1387   
        let expected_headers = [
 1334   1388   
            ("Content-Type", "application/x-amz-json-1.1"),
 1335   1389   
            ("X-Amz-Target", "JsonProtocol.KitchenSinkOperation"),
 1336   1390   
        ];
 1337   1391   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
 1338   1392   
        let required_headers = &["Content-Length"];
 1339   1393   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::require_headers(http_request.headers(), required_headers));
 1340   1394   
        let body = http_request.body().bytes().expect("body should be strict");
 1341   1395   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
 1342   1396   
            body,
 1343   1397   
            "{\"EmptyStruct\":{}}",
 1344   1398   
            ::aws_smithy_protocol_test::MediaType::from("application/json"),
 1345   1399   
        ));
 1346   1400   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
 1347   1401   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
 1348   1402   
        ::pretty_assertions::assert_eq!(uri.path(), "/", "path was incorrect");
 1349   1403   
    }
 1350   1404   
 1351   1405   
    /// Serializes recursive structure shapes
 1352   1406   
    /// Test ID: serializes_recursive_structure_shapes
 1353   1407   
    #[::tokio::test]
 1354   1408   
    #[::tracing_test::traced_test]
 1355   1409   
    async fn serializes_recursive_structure_shapes_request() {
 1356   1410   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
 1357   1411   
        let config_builder = crate::config::Config::builder()
 1358   1412   
            .with_test_defaults()
 1359         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
        1413  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
        1414  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
        1415  +
            .allow_no_auth()
 1360   1416   
            .endpoint_url("https://example.com");
 1361   1417   
 1362   1418   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
 1363   1419   
        let result = client
 1364   1420   
            .kitchen_sink_operation()
 1365   1421   
            .set_string(::std::option::Option::Some("top-value".to_owned()))
 1366   1422   
            .set_boolean(::std::option::Option::Some(false))
 1367   1423   
            .set_recursive_struct(::std::option::Option::Some(::std::boxed::Box::new(
 1368   1424   
                crate::types::KitchenSink::builder()
 1369   1425   
                    .set_string(::std::option::Option::Some("nested-value".to_owned()))

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/operation/null_operation.rs

@@ -221,221 +281,283 @@
  241    241   
mod null_operation_test {
  242    242   
  243    243   
    /// Null structure values are dropped
  244    244   
    /// Test ID: AwsJson11StructuresDontSerializeNullValues
  245    245   
    #[::tokio::test]
  246    246   
    #[::tracing_test::traced_test]
  247    247   
    async fn aws_json11_structures_dont_serialize_null_values_request() {
  248    248   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  249    249   
        let config_builder = crate::config::Config::builder()
  250    250   
            .with_test_defaults()
  251         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         251  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         252  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         253  +
            .allow_no_auth()
  252    254   
            .endpoint_url("https://example.com");
  253    255   
  254    256   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  255    257   
        let result = client.null_operation().set_string(::std::option::Option::None).send().await;
  256    258   
        let _ = dbg!(result);
  257    259   
        let http_request = request_receiver.expect_request();
  258    260   
        let expected_headers = [
  259    261   
            ("Content-Type", "application/x-amz-json-1.1"),
  260    262   
            ("X-Amz-Target", "JsonProtocol.NullOperation"),
  261    263   
        ];

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/operation/operation_with_optional_input_output.rs

@@ -233,233 +324,328 @@
  253    253   
mod operation_with_optional_input_output_test {
  254    254   
  255    255   
    /// Can call operations with no input or output
  256    256   
    /// Test ID: can_call_operation_with_no_input_or_output
  257    257   
    #[::tokio::test]
  258    258   
    #[::tracing_test::traced_test]
  259    259   
    async fn can_call_operation_with_no_input_or_output_request() {
  260    260   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  261    261   
        let config_builder = crate::config::Config::builder()
  262    262   
            .with_test_defaults()
  263         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         263  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         264  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         265  +
            .allow_no_auth()
  264    266   
            .endpoint_url("https://example.com");
  265    267   
  266    268   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  267    269   
        let result = client.operation_with_optional_input_output().send().await;
  268    270   
        let _ = dbg!(result);
  269    271   
        let http_request = request_receiver.expect_request();
  270    272   
        let expected_headers = [
  271    273   
            ("Content-Type", "application/x-amz-json-1.1"),
  272    274   
            ("X-Amz-Target", "JsonProtocol.OperationWithOptionalInputOutput"),
  273    275   
        ];
  274    276   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  275    277   
        let body = http_request.body().bytes().expect("body should be strict");
  276    278   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
  277    279   
            body,
  278    280   
            "{}",
  279    281   
            ::aws_smithy_protocol_test::MediaType::from("application/json"),
  280    282   
        ));
  281    283   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  282    284   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  283    285   
        ::pretty_assertions::assert_eq!(uri.path(), "/", "path was incorrect");
  284    286   
    }
  285    287   
  286    288   
    /// Can invoke operations with optional input
  287    289   
    /// Test ID: can_call_operation_with_optional_input
  288    290   
    #[::tokio::test]
  289    291   
    #[::tracing_test::traced_test]
  290    292   
    async fn can_call_operation_with_optional_input_request() {
  291    293   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  292    294   
        let config_builder = crate::config::Config::builder()
  293    295   
            .with_test_defaults()
  294         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         296  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         297  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         298  +
            .allow_no_auth()
  295    299   
            .endpoint_url("https://example.com");
  296    300   
  297    301   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  298    302   
        let result = client
  299    303   
            .operation_with_optional_input_output()
  300    304   
            .set_value(::std::option::Option::Some("Hi".to_owned()))
  301    305   
            .send()
  302    306   
            .await;
  303    307   
        let _ = dbg!(result);
  304    308   
        let http_request = request_receiver.expect_request();

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/operation/put_and_get_inline_documents.rs

@@ -229,229 +289,291 @@
  249    249   
mod put_and_get_inline_documents_test {
  250    250   
  251    251   
    /// Serializes inline documents in a JSON request.
  252    252   
    /// Test ID: PutAndGetInlineDocumentsInput
  253    253   
    #[::tokio::test]
  254    254   
    #[::tracing_test::traced_test]
  255    255   
    async fn put_and_get_inline_documents_input_request() {
  256    256   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  257    257   
        let config_builder = crate::config::Config::builder()
  258    258   
            .with_test_defaults()
  259         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         259  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         260  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         261  +
            .allow_no_auth()
  260    262   
            .endpoint_url("https://example.com");
  261    263   
  262    264   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  263    265   
        let result = client
  264    266   
            .put_and_get_inline_documents()
  265    267   
            .set_inline_document(::std::option::Option::Some({
  266    268   
                let json_bytes = br#"{
  267    269   
                        "foo": "bar"
  268    270   
                    }"#;
  269    271   
                let mut tokens = ::aws_smithy_json::deserialize::json_token_iter(json_bytes).peekable();

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/operation/put_with_content_encoding.rs

@@ -229,229 +320,324 @@
  249    249   
mod put_with_content_encoding_test {
  250    250   
  251    251   
    /// Compression algorithm encoding is appended to the Content-Encoding header.
  252    252   
    /// Test ID: SDKAppliedContentEncoding_awsJson1_1
  253    253   
    #[::tokio::test]
  254    254   
    #[::tracing_test::traced_test]
  255    255   
    async fn sdk_applied_content_encoding_aws_json1_1_request() {
  256    256   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  257    257   
        let config_builder = crate::config::Config::builder()
  258    258   
            .with_test_defaults()
  259         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         259  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         260  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         261  +
            .allow_no_auth()
  260    262   
            .endpoint_url("https://example.com");
  261    263   
  262    264   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  263    265   
        let result = client.put_with_content_encoding()
  264    266   
        .set_data(
  265    267   
            ::std::option::Option::Some(
  266    268   
                "RjCEL3kBwqPivZUXGiyA5JCujtWgJAkKRlnTEsNYfBRGOS0f7LT6R3bCSOXeJ4auSHzQ4BEZZTklUyj5\n1HEojihShQC2jkQJrNdGOZNSW49yRO0XbnGmeczUHbZqZRelLFKW4xjru9uTuB8lFCtwoGgciFsgqTF8\n5HYcoqINTRxuAwGuRUMoNO473QT0BtCQoKUkAyVaypG0hBZdGNoJhunBfW0d3HWTYlzz9pXEly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Y2KioKzO8XR6FKm6qonMKVEwQNtlYE9c97KMtEnp25VOdMP46SQXS\nYsSVp7vm8LP87VYI8SOKcW3s2oedYFtt45rvDzoTF0GmS6wELQ9uo98HhjQAI1Dt91cgjJOwygNmLoZE\nX5K2zQiNA163uMCl5xzaBqY4YTL0wgALg3IFdYSp0RFYLWdt6IxoGI1tnoxcjlUEPo5eGIc3mS3SmaLn\nOdumfUQQ4Jgmgaa5anUVQsfBDrlAN5oaX7O0JO71SSPSWiHBsT9WIPy2J1Cace9ZZLRxblFPSXcvsuHh\nhvnhWQltEDAe7MgvkFQ8lGVFa8jhzijoF9kLmMhMILSzYnfXnZPNP7TlAAwlLHK1RqlpHskJqb6CPpGP\nQvOAhEMsM3zJ2KejZx0esxkjxA0ZufVvGAMN3vTUMplQaF4RiQkp9fzBXf3CMk01dWjOMMIEXTeKzIQe\nEcffzjixWU9FpAyGp2rVl4ETRgqljOGw4UgK31r0ZIEGnH0xGz1FtbW1OcQM008JVujRqulCucEMmntr\n".to_owned()
  267    269   
            )
  268    270   
        )
  269    271   
        .send().await;
  270    272   
        let _ = dbg!(result);
  271    273   
        let http_request = request_receiver.expect_request();
  272    274   
        let expected_headers = [("Content-Encoding", "gzip")];
  273    275   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  274    276   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  275    277   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  276    278   
        ::pretty_assertions::assert_eq!(uri.path(), "/", "path was incorrect");
  277    279   
    }
  278    280   
  279    281   
    /// Compression algorithm encoding is appended to the Content-Encoding header, and the
  280    282   
    /// user-provided content-encoding is NOT in the Content-Encoding header since HTTP binding
  281    283   
    /// traits are ignored in the awsJson1_1 protocol.
  282    284   
    ///
  283    285   
    /// Test ID: SDKAppendsGzipAndIgnoresHttpProvidedEncoding_awsJson1_1
  284    286   
    #[::tokio::test]
  285    287   
    #[::tracing_test::traced_test]
  286    288   
    async fn sdk_appends_gzip_and_ignores_http_provided_encoding_aws_json1_1_request() {
  287    289   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  288    290   
        let config_builder = crate::config::Config::builder()
  289    291   
            .with_test_defaults()
  290         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         292  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         293  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         294  +
            .allow_no_auth()
  291    295   
            .endpoint_url("https://example.com");
  292    296   
  293    297   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  294    298   
        let result = client.put_with_content_encoding()
  295    299   
        .set_encoding(
  296    300   
            ::std::option::Option::Some(
  297    301   
                "custom".to_owned()
  298    302   
            )
  299    303   
        )
  300    304   
        .set_data(

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/operation/simple_scalar_properties.rs

@@ -230,230 +370,376 @@
  250    250   
    use ::aws_smithy_protocol_test::FloatEquals;
  251    251   
  252    252   
    /// Supports handling NaN float values.
  253    253   
    /// Test ID: AwsJson11SupportsNaNFloatInputs
  254    254   
    #[::tokio::test]
  255    255   
    #[::tracing_test::traced_test]
  256    256   
    async fn aws_json11_supports_na_n_float_inputs_request() {
  257    257   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  258    258   
        let config_builder = crate::config::Config::builder()
  259    259   
            .with_test_defaults()
  260         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         260  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         261  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         262  +
            .allow_no_auth()
  261    263   
            .endpoint_url("https://example.com");
  262    264   
  263    265   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  264    266   
        let result = client
  265    267   
            .simple_scalar_properties()
  266    268   
            .set_float_value(::std::option::Option::Some(
  267    269   
                <f32 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive("NaN").expect("invalid string for number"),
  268    270   
            ))
  269    271   
            .set_double_value(::std::option::Option::Some(
  270    272   
                <f64 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive("NaN").expect("invalid string for number"),
  271    273   
            ))
  272    274   
            .send()
  273    275   
            .await;
  274    276   
        let _ = dbg!(result);
  275    277   
        let http_request = request_receiver.expect_request();
  276    278   
        let expected_headers = [
  277    279   
            ("Content-Type", "application/x-amz-json-1.1"),
  278    280   
            ("X-Amz-Target", "JsonProtocol.SimpleScalarProperties"),
  279    281   
        ];
  280    282   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  281    283   
        let body = http_request.body().bytes().expect("body should be strict");
  282    284   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
  283    285   
            body,
  284    286   
            "{\n    \"floatValue\": \"NaN\",\n    \"doubleValue\": \"NaN\"\n}",
  285    287   
            ::aws_smithy_protocol_test::MediaType::from("application/json"),
  286    288   
        ));
  287    289   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  288    290   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  289    291   
        ::pretty_assertions::assert_eq!(uri.path(), "/", "path was incorrect");
  290    292   
    }
  291    293   
  292    294   
    /// Supports handling Infinity float values.
  293    295   
    /// Test ID: AwsJson11SupportsInfinityFloatInputs
  294    296   
    #[::tokio::test]
  295    297   
    #[::tracing_test::traced_test]
  296    298   
    async fn aws_json11_supports_infinity_float_inputs_request() {
  297    299   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  298    300   
        let config_builder = crate::config::Config::builder()
  299    301   
            .with_test_defaults()
  300         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         302  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         303  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         304  +
            .allow_no_auth()
  301    305   
            .endpoint_url("https://example.com");
  302    306   
  303    307   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  304    308   
        let result = client
  305    309   
            .simple_scalar_properties()
  306    310   
            .set_float_value(::std::option::Option::Some(
  307    311   
                <f32 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive("Infinity").expect("invalid string for number"),
  308    312   
            ))
  309    313   
            .set_double_value(::std::option::Option::Some(
  310    314   
                <f64 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive("Infinity").expect("invalid string for number"),
  311    315   
            ))
  312    316   
            .send()
  313    317   
            .await;
  314    318   
        let _ = dbg!(result);
  315    319   
        let http_request = request_receiver.expect_request();
  316    320   
        let expected_headers = [
  317    321   
            ("Content-Type", "application/x-amz-json-1.1"),
  318    322   
            ("X-Amz-Target", "JsonProtocol.SimpleScalarProperties"),
  319    323   
        ];
  320    324   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  321    325   
        let body = http_request.body().bytes().expect("body should be strict");
  322    326   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
  323    327   
            body,
  324    328   
            "{\n    \"floatValue\": \"Infinity\",\n    \"doubleValue\": \"Infinity\"\n}",
  325    329   
            ::aws_smithy_protocol_test::MediaType::from("application/json"),
  326    330   
        ));
  327    331   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  328    332   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  329    333   
        ::pretty_assertions::assert_eq!(uri.path(), "/", "path was incorrect");
  330    334   
    }
  331    335   
  332    336   
    /// Supports handling -Infinity float values.
  333    337   
    /// Test ID: AwsJson11SupportsNegativeInfinityFloatInputs
  334    338   
    #[::tokio::test]
  335    339   
    #[::tracing_test::traced_test]
  336    340   
    async fn aws_json11_supports_negative_infinity_float_inputs_request() {
  337    341   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  338    342   
        let config_builder = crate::config::Config::builder()
  339    343   
            .with_test_defaults()
  340         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         344  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         345  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         346  +
            .allow_no_auth()
  341    347   
            .endpoint_url("https://example.com");
  342    348   
  343    349   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  344    350   
        let result = client
  345    351   
            .simple_scalar_properties()
  346    352   
            .set_float_value(::std::option::Option::Some(
  347    353   
                <f32 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive("-Infinity").expect("invalid string for number"),
  348    354   
            ))
  349    355   
            .set_double_value(::std::option::Option::Some(
  350    356   
                <f64 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive("-Infinity").expect("invalid string for number"),

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/operation/sparse_nulls_operation.rs

@@ -229,229 +328,332 @@
  249    249   
mod sparse_nulls_operation_test {
  250    250   
  251    251   
    /// Serializes null values in maps
  252    252   
    /// Test ID: AwsJson11SparseMapsSerializeNullValues
  253    253   
    #[::tokio::test]
  254    254   
    #[::tracing_test::traced_test]
  255    255   
    async fn aws_json11_sparse_maps_serialize_null_values_request() {
  256    256   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  257    257   
        let config_builder = crate::config::Config::builder()
  258    258   
            .with_test_defaults()
  259         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         259  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         260  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         261  +
            .allow_no_auth()
  260    262   
            .endpoint_url("https://example.com");
  261    263   
  262    264   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  263    265   
        let result = client
  264    266   
            .sparse_nulls_operation()
  265    267   
            .set_sparse_string_map(::std::option::Option::Some({
  266    268   
                let mut ret = ::std::collections::HashMap::new();
  267    269   
                ret.insert("foo".to_owned(), ::std::option::Option::None);
  268    270   
                ret
  269    271   
            }))
  270    272   
            .send()
  271    273   
            .await;
  272    274   
        let _ = dbg!(result);
  273    275   
        let http_request = request_receiver.expect_request();
  274    276   
        let expected_headers = [
  275    277   
            ("Content-Type", "application/x-amz-json-1.1"),
  276    278   
            ("X-Amz-Target", "JsonProtocol.SparseNullsOperation"),
  277    279   
        ];
  278    280   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  279    281   
        let body = http_request.body().bytes().expect("body should be strict");
  280    282   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
  281    283   
            body,
  282    284   
            "{\n    \"sparseStringMap\": {\n        \"foo\": null\n    }\n}",
  283    285   
            ::aws_smithy_protocol_test::MediaType::from("application/json"),
  284    286   
        ));
  285    287   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  286    288   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  287    289   
        ::pretty_assertions::assert_eq!(uri.path(), "/", "path was incorrect");
  288    290   
    }
  289    291   
  290    292   
    /// Serializes null values in lists
  291    293   
    /// Test ID: AwsJson11SparseListsSerializeNull
  292    294   
    #[::tokio::test]
  293    295   
    #[::tracing_test::traced_test]
  294    296   
    async fn aws_json11_sparse_lists_serialize_null_request() {
  295    297   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  296    298   
        let config_builder = crate::config::Config::builder()
  297    299   
            .with_test_defaults()
  298         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         300  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         301  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         302  +
            .allow_no_auth()
  299    303   
            .endpoint_url("https://example.com");
  300    304   
  301    305   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  302    306   
        let result = client
  303    307   
            .sparse_nulls_operation()
  304    308   
            .set_sparse_string_list(::std::option::Option::Some(vec![::std::option::Option::None]))
  305    309   
            .send()
  306    310   
            .await;
  307    311   
        let _ = dbg!(result);
  308    312   
        let http_request = request_receiver.expect_request();

tmp-codegen-diff/codegen-client-test/misc/rust-client-codegen/src/config.rs

@@ -350,350 +409,425 @@
  370    370   
  371    371   
    /// Set the auth scheme resolver for the builder
  372    372   
    ///
  373    373   
    /// # Examples
  374    374   
    /// See an example for [`Self::auth_scheme_resolver`].
  375    375   
    pub fn set_auth_scheme_resolver(&mut self, auth_scheme_resolver: impl crate::config::auth::ResolveAuthScheme + 'static) -> &mut Self {
  376    376   
        self.runtime_components
  377    377   
            .set_auth_scheme_option_resolver(::std::option::Option::Some(auth_scheme_resolver.into_shared_resolver()));
  378    378   
        self
  379    379   
    }
         380  +
         381  +
    /// Add [NoAuthScheme](aws_smithy_runtime::client::auth::no_auth::NoAuthScheme) as a fallback for operations that don't require authentication
         382  +
    ///
         383  +
    /// The auth scheme resolver will use this when no other auth schemes are applicable.
         384  +
    pub fn allow_no_auth(mut self) -> Self {
         385  +
        self.set_allow_no_auth();
         386  +
        self
         387  +
    }
         388  +
         389  +
    /// Add [NoAuthScheme](aws_smithy_runtime::client::auth::no_auth::NoAuthScheme) as a fallback for operations that don't require authentication
         390  +
    ///
         391  +
    /// The auth scheme resolver will use this when no other auth schemes are applicable.
         392  +
    pub fn set_allow_no_auth(&mut self) -> &mut Self {
         393  +
        self.push_runtime_plugin(::aws_smithy_runtime::client::auth::no_auth::NoAuthRuntimePluginV2::new().into_shared());
         394  +
        self
         395  +
    }
  380    396   
    /// Set the auth scheme preference for an auth scheme resolver
  381    397   
    /// (typically the default auth scheme resolver).
  382    398   
    ///
  383    399   
    /// Each operation has a predefined order of auth schemes, as determined by the service,
  384    400   
    /// for auth scheme resolution. By using the auth scheme preference, customers
  385    401   
    /// can reorder the schemes resolved by the auth scheme resolver.
  386    402   
    ///
  387    403   
    /// The preference list is intended as a hint rather than a strict override.
  388    404   
    /// Any schemes not present in the originally resolved auth schemes will be ignored.
  389    405   
    ///
@@ -1196,1212 +1256,1273 @@
 1216   1232   
    {
 1217   1233   
        if config.behavior_version.is_none() {
 1218   1234   
            config.behavior_version = Some(::aws_smithy_runtime_api::client::behavior_version::BehaviorVersion::latest());
 1219   1235   
        }
 1220   1236   
    }
 1221   1237   
 1222   1238   
    let default_retry_partition = "miscservice";
 1223   1239   
 1224   1240   
    let scope = "misc";
 1225   1241   
 1226         -
    let mut plugins = ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins::new()
        1242  +
    #[allow(deprecated)]
        1243  +
                    let mut plugins = ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins::new()
 1227   1244   
                        // defaults
 1228   1245   
                        .with_client_plugins(::aws_smithy_runtime::client::defaults::default_plugins(
 1229   1246   
                            ::aws_smithy_runtime::client::defaults::DefaultPluginParams::new()
 1230   1247   
                                .with_retry_partition_name(default_retry_partition)
 1231   1248   
                                .with_behavior_version(config.behavior_version.expect("Invalid client configuration: A behavior major version must be set when sending a request or constructing a client. You must set it during client construction or by enabling the `behavior-version-latest` cargo feature."))
 1232   1249   
                        ))
 1233   1250   
                        // user config
 1234   1251   
                        .with_client_plugin(
 1235   1252   
                            ::aws_smithy_runtime_api::client::runtime_plugin::StaticRuntimePlugin::new()
 1236   1253   
                                .with_config(config.config.clone())