Client Test

Client Test

rev. 26e0a1e8aaec58e3c7fd18a79449d71bcadaf391 (ignoring whitespace)

Files changed:

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/input_and_output_with_headers.rs

@@ -220,220 +521,537 @@
  240    240   
    use ::aws_smithy_protocol_test::FloatEquals;
  241    241   
  242    242   
    /// Tests requests with string header bindings
  243    243   
    /// Test ID: InputAndOutputWithStringHeaders
  244    244   
    #[::tokio::test]
  245    245   
    #[::tracing_test::traced_test]
  246    246   
    async fn input_and_output_with_string_headers_request() {
  247    247   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  248    248   
        let config_builder = crate::config::Config::builder()
  249    249   
            .with_test_defaults()
  250         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         250  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         251  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         252  +
            .allow_no_auth()
  251    253   
            .endpoint_url("https://example.com");
  252    254   
  253    255   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  254    256   
        let result = client
  255    257   
            .input_and_output_with_headers()
  256    258   
            .set_header_string(::std::option::Option::Some("Hello".to_owned()))
  257    259   
            .set_header_string_list(::std::option::Option::Some(vec!["a".to_owned(), "b".to_owned(), "c".to_owned()]))
  258    260   
            .set_header_string_set(::std::option::Option::Some(vec!["a".to_owned(), "b".to_owned(), "c".to_owned()]))
  259    261   
            .send()
  260    262   
            .await;
  261    263   
        let _ = dbg!(result);
  262    264   
        let http_request = request_receiver.expect_request();
  263    265   
        let expected_headers = [("X-String", "Hello"), ("X-StringList", "a, b, c"), ("X-StringSet", "a, b, c")];
  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   
        // No body.
  267    269   
        ::pretty_assertions::assert_eq!(&body, &::bytes::Bytes::new());
  268    270   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  269    271   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  270    272   
        ::pretty_assertions::assert_eq!(uri.path(), "/InputAndOutputWithHeaders", "path was incorrect");
  271    273   
    }
  272    274   
  273    275   
    /// Tests requests with numeric header bindings
  274    276   
    /// Test ID: InputAndOutputWithNumericHeaders
  275    277   
    #[::tokio::test]
  276    278   
    #[::tracing_test::traced_test]
  277    279   
    async fn input_and_output_with_numeric_headers_request() {
  278    280   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  279    281   
        let config_builder = crate::config::Config::builder()
  280    282   
            .with_test_defaults()
  281         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         283  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         284  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         285  +
            .allow_no_auth()
  282    286   
            .endpoint_url("https://example.com");
  283    287   
  284    288   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  285    289   
        let result = client
  286    290   
            .input_and_output_with_headers()
  287    291   
            .set_header_byte(::std::option::Option::Some(1))
  288    292   
            .set_header_short(::std::option::Option::Some(123))
  289    293   
            .set_header_integer(::std::option::Option::Some(123))
  290    294   
            .set_header_long(::std::option::Option::Some(123))
  291    295   
            .set_header_float(::std::option::Option::Some(1.1_f32))
  292    296   
            .set_header_double(::std::option::Option::Some(1.1_f64))
  293    297   
            .set_header_integer_list(::std::option::Option::Some(vec![1, 2, 3]))
  294    298   
            .send()
  295    299   
            .await;
  296    300   
        let _ = dbg!(result);
  297    301   
        let http_request = request_receiver.expect_request();
  298    302   
        let expected_headers = [
  299    303   
            ("X-Byte", "1"),
  300    304   
            ("X-Double", "1.1"),
  301    305   
            ("X-Float", "1.1"),
  302    306   
            ("X-Integer", "123"),
  303    307   
            ("X-IntegerList", "1, 2, 3"),
  304    308   
            ("X-Long", "123"),
  305    309   
            ("X-Short", "123"),
  306    310   
        ];
  307    311   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  308    312   
        let body = http_request.body().bytes().expect("body should be strict");
  309    313   
        // No body.
  310    314   
        ::pretty_assertions::assert_eq!(&body, &::bytes::Bytes::new());
  311    315   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  312    316   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  313    317   
        ::pretty_assertions::assert_eq!(uri.path(), "/InputAndOutputWithHeaders", "path was incorrect");
  314    318   
    }
  315    319   
  316    320   
    /// Tests requests with boolean header bindings
  317    321   
    /// Test ID: InputAndOutputWithBooleanHeaders
  318    322   
    #[::tokio::test]
  319    323   
    #[::tracing_test::traced_test]
  320    324   
    async fn input_and_output_with_boolean_headers_request() {
  321    325   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  322    326   
        let config_builder = crate::config::Config::builder()
  323    327   
            .with_test_defaults()
  324         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         328  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         329  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         330  +
            .allow_no_auth()
  325    331   
            .endpoint_url("https://example.com");
  326    332   
  327    333   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  328    334   
        let result = client
  329    335   
            .input_and_output_with_headers()
  330    336   
            .set_header_true_bool(::std::option::Option::Some(true))
  331    337   
            .set_header_false_bool(::std::option::Option::Some(false))
  332    338   
            .set_header_boolean_list(::std::option::Option::Some(vec![true, false, true]))
  333    339   
            .send()
  334    340   
            .await;
  335    341   
        let _ = dbg!(result);
  336    342   
        let http_request = request_receiver.expect_request();
  337    343   
        let expected_headers = [("X-Boolean1", "true"), ("X-Boolean2", "false"), ("X-BooleanList", "true, false, true")];
  338    344   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  339    345   
        let body = http_request.body().bytes().expect("body should be strict");
  340    346   
        // No body.
  341    347   
        ::pretty_assertions::assert_eq!(&body, &::bytes::Bytes::new());
  342    348   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  343    349   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  344    350   
        ::pretty_assertions::assert_eq!(uri.path(), "/InputAndOutputWithHeaders", "path was incorrect");
  345    351   
    }
  346    352   
  347    353   
    /// Tests requests with timestamp header bindings
  348    354   
    /// Test ID: InputAndOutputWithTimestampHeaders
  349    355   
    #[::tokio::test]
  350    356   
    #[::tracing_test::traced_test]
  351    357   
    async fn input_and_output_with_timestamp_headers_request() {
  352    358   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  353    359   
        let config_builder = crate::config::Config::builder()
  354    360   
            .with_test_defaults()
  355         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         361  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         362  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         363  +
            .allow_no_auth()
  356    364   
            .endpoint_url("https://example.com");
  357    365   
  358    366   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  359    367   
        let result = client
  360    368   
            .input_and_output_with_headers()
  361    369   
            .set_header_timestamp_list(::std::option::Option::Some(vec![
  362    370   
                ::aws_smithy_types::DateTime::from_fractional_secs(1576540098, 0_f64),
  363    371   
                ::aws_smithy_types::DateTime::from_fractional_secs(1576540098, 0_f64),
  364    372   
            ]))
  365    373   
            .send()
  366    374   
            .await;
  367    375   
        let _ = dbg!(result);
  368    376   
        let http_request = request_receiver.expect_request();
  369    377   
        let expected_headers = [("X-TimestampList", "Mon, 16 Dec 2019 23:48:18 GMT, Mon, 16 Dec 2019 23:48:18 GMT")];
  370    378   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  371    379   
        let body = http_request.body().bytes().expect("body should be strict");
  372    380   
        // No body.
  373    381   
        ::pretty_assertions::assert_eq!(&body, &::bytes::Bytes::new());
  374    382   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  375    383   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  376    384   
        ::pretty_assertions::assert_eq!(uri.path(), "/InputAndOutputWithHeaders", "path was incorrect");
  377    385   
    }
  378    386   
  379    387   
    /// Tests requests with enum header bindings
  380    388   
    /// Test ID: InputAndOutputWithEnumHeaders
  381    389   
    #[::tokio::test]
  382    390   
    #[::tracing_test::traced_test]
  383    391   
    async fn input_and_output_with_enum_headers_request() {
  384    392   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  385    393   
        let config_builder = crate::config::Config::builder()
  386    394   
            .with_test_defaults()
  387         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         395  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         396  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         397  +
            .allow_no_auth()
  388    398   
            .endpoint_url("https://example.com");
  389    399   
  390    400   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  391    401   
        let result = client
  392    402   
            .input_and_output_with_headers()
  393    403   
            .set_header_enum(::std::option::Option::Some(
  394    404   
                "Foo".parse::<crate::types::FooEnum>().expect("static value validated to member"),
  395    405   
            ))
  396    406   
            .set_header_enum_list(::std::option::Option::Some(vec![
  397    407   
                "Foo".parse::<crate::types::FooEnum>().expect("static value validated to member"),
  398    408   
                "Bar".parse::<crate::types::FooEnum>().expect("static value validated to member"),
  399    409   
                "Baz".parse::<crate::types::FooEnum>().expect("static value validated to member"),
  400    410   
            ]))
  401    411   
            .send()
  402    412   
            .await;
  403    413   
        let _ = dbg!(result);
  404    414   
        let http_request = request_receiver.expect_request();
  405    415   
        let expected_headers = [("X-Enum", "Foo"), ("X-EnumList", "Foo, Bar, Baz")];
  406    416   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  407    417   
        let body = http_request.body().bytes().expect("body should be strict");
  408    418   
        // No body.
  409    419   
        ::pretty_assertions::assert_eq!(&body, &::bytes::Bytes::new());
  410    420   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  411    421   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  412    422   
        ::pretty_assertions::assert_eq!(uri.path(), "/InputAndOutputWithHeaders", "path was incorrect");
  413    423   
    }
  414    424   
  415    425   
    /// Supports handling NaN float header values.
  416    426   
    /// Test ID: RestXmlSupportsNaNFloatHeaderInputs
  417    427   
    #[::tokio::test]
  418    428   
    #[::tracing_test::traced_test]
  419    429   
    async fn rest_xml_supports_na_n_float_header_inputs_request() {
  420    430   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  421    431   
        let config_builder = crate::config::Config::builder()
  422    432   
            .with_test_defaults()
  423         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         433  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         434  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         435  +
            .allow_no_auth()
  424    436   
            .endpoint_url("https://example.com");
  425    437   
  426    438   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  427    439   
        let result = client
  428    440   
            .input_and_output_with_headers()
  429    441   
            .set_header_float(::std::option::Option::Some(
  430    442   
                <f32 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive("NaN").expect("invalid string for number"),
  431    443   
            ))
  432    444   
            .set_header_double(::std::option::Option::Some(
  433    445   
                <f64 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive("NaN").expect("invalid string for number"),
  434    446   
            ))
  435    447   
            .send()
  436    448   
            .await;
  437    449   
        let _ = dbg!(result);
  438    450   
        let http_request = request_receiver.expect_request();
  439    451   
        let expected_headers = [("X-Double", "NaN"), ("X-Float", "NaN")];
  440    452   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  441    453   
        let body = http_request.body().bytes().expect("body should be strict");
  442    454   
        // No body.
  443    455   
        ::pretty_assertions::assert_eq!(&body, &::bytes::Bytes::new());
  444    456   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  445    457   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  446    458   
        ::pretty_assertions::assert_eq!(uri.path(), "/InputAndOutputWithHeaders", "path was incorrect");
  447    459   
    }
  448    460   
  449    461   
    /// Supports handling Infinity float header values.
  450    462   
    /// Test ID: RestXmlSupportsInfinityFloatHeaderInputs
  451    463   
    #[::tokio::test]
  452    464   
    #[::tracing_test::traced_test]
  453    465   
    async fn rest_xml_supports_infinity_float_header_inputs_request() {
  454    466   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  455    467   
        let config_builder = crate::config::Config::builder()
  456    468   
            .with_test_defaults()
  457         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         469  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         470  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         471  +
            .allow_no_auth()
  458    472   
            .endpoint_url("https://example.com");
  459    473   
  460    474   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  461    475   
        let result = client
  462    476   
            .input_and_output_with_headers()
  463    477   
            .set_header_float(::std::option::Option::Some(
  464    478   
                <f32 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive("Infinity").expect("invalid string for number"),
  465    479   
            ))
  466    480   
            .set_header_double(::std::option::Option::Some(
  467    481   
                <f64 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive("Infinity").expect("invalid string for number"),
  468    482   
            ))
  469    483   
            .send()
  470    484   
            .await;
  471    485   
        let _ = dbg!(result);
  472    486   
        let http_request = request_receiver.expect_request();
  473    487   
        let expected_headers = [("X-Double", "Infinity"), ("X-Float", "Infinity")];
  474    488   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  475    489   
        let body = http_request.body().bytes().expect("body should be strict");
  476    490   
        // No body.
  477    491   
        ::pretty_assertions::assert_eq!(&body, &::bytes::Bytes::new());
  478    492   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  479    493   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  480    494   
        ::pretty_assertions::assert_eq!(uri.path(), "/InputAndOutputWithHeaders", "path was incorrect");
  481    495   
    }
  482    496   
  483    497   
    /// Supports handling -Infinity float header values.
  484    498   
    /// Test ID: RestXmlSupportsNegativeInfinityFloatHeaderInputs
  485    499   
    #[::tokio::test]
  486    500   
    #[::tracing_test::traced_test]
  487    501   
    async fn rest_xml_supports_negative_infinity_float_header_inputs_request() {
  488    502   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  489    503   
        let config_builder = crate::config::Config::builder()
  490    504   
            .with_test_defaults()
  491         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         505  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         506  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         507  +
            .allow_no_auth()
  492    508   
            .endpoint_url("https://example.com");
  493    509   
  494    510   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  495    511   
        let result = client
  496    512   
            .input_and_output_with_headers()
  497    513   
            .set_header_float(::std::option::Option::Some(
  498    514   
                <f32 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive("-Infinity").expect("invalid string for number"),
  499    515   
            ))
  500    516   
            .set_header_double(::std::option::Option::Some(
  501    517   
                <f64 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive("-Infinity").expect("invalid string for number"),

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/nested_xml_map_with_xml_name.rs

@@ -224,224 +284,286 @@
  244    244   
mod nested_xml_map_with_xml_name_test {
  245    245   
  246    246   
    /// Serializes nested XML Maps in requests that have xmlName on members
  247    247   
    /// Test ID: NestedXmlMapWithXmlNameSerializes
  248    248   
    #[::tokio::test]
  249    249   
    #[::tracing_test::traced_test]
  250    250   
    async fn nested_xml_map_with_xml_name_serializes_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
  259    261   
            .nested_xml_map_with_xml_name()
  260    262   
            .set_nested_xml_map_with_xml_name_map(::std::option::Option::Some({
  261    263   
                let mut ret = ::std::collections::HashMap::new();
  262    264   
                ret.insert("foo".to_owned(), {
  263    265   
                    let mut ret = ::std::collections::HashMap::new();
  264    266   
                    ret.insert("bar".to_owned(), "Baz".to_owned());

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/nested_xml_maps.rs

@@ -216,216 +318,322 @@
  236    236   
mod nested_xml_maps_test {
  237    237   
  238    238   
    /// Tests requests with nested maps.
  239    239   
    /// Test ID: NestedXmlMapRequest
  240    240   
    #[::tokio::test]
  241    241   
    #[::tracing_test::traced_test]
  242    242   
    async fn nested_xml_map_request_request() {
  243    243   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  244    244   
        let config_builder = crate::config::Config::builder()
  245    245   
            .with_test_defaults()
  246         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         246  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         247  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         248  +
            .allow_no_auth()
  247    249   
            .endpoint_url("https://example.com");
  248    250   
  249    251   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  250    252   
        let result = client
  251    253   
            .nested_xml_maps()
  252    254   
            .set_nested_map(::std::option::Option::Some({
  253    255   
                let mut ret = ::std::collections::HashMap::new();
  254    256   
                ret.insert("foo".to_owned(), {
  255    257   
                    let mut ret = ::std::collections::HashMap::new();
  256    258   
                    ret.insert(
  257    259   
                        "bar".to_owned(),
  258    260   
                        "Bar".parse::<crate::types::FooEnum>().expect("static value validated to member"),
  259    261   
                    );
  260    262   
                    ret
  261    263   
                });
  262    264   
                ret
  263    265   
            }))
  264    266   
            .send()
  265    267   
            .await;
  266    268   
        let _ = dbg!(result);
  267    269   
        let http_request = request_receiver.expect_request();
  268    270   
        let expected_headers = [("Content-Type", "application/xml")];
  269    271   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  270    272   
        let body = http_request.body().bytes().expect("body should be strict");
  271    273   
        ::aws_smithy_protocol_test::assert_ok(
  272    274   
        ::aws_smithy_protocol_test::validate_body(body, "<NestedXmlMapsRequest>\n    <nestedMap>\n        <entry>\n            <key>foo</key>\n            <value>\n                <entry>\n                    <key>bar</key>\n                    <value>Bar</value>\n                </entry>\n            </value>\n        </entry>\n    </nestedMap>\n</NestedXmlMapsRequest>", ::aws_smithy_protocol_test::MediaType::from("application/xml"))
  273    275   
        );
  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(), "/NestedXmlMaps", "path was incorrect");
  277    279   
    }
  278    280   
  279    281   
    /// Tests requests with nested flat maps. Since maps can only be
  280    282   
    /// flattened when they're structure members, only the outer map is flat.
  281    283   
    /// Test ID: FlatNestedXmlMapRequest
  282    284   
    #[::tokio::test]
  283    285   
    #[::tracing_test::traced_test]
  284    286   
    async fn flat_nested_xml_map_request_request() {
  285    287   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  286    288   
        let config_builder = crate::config::Config::builder()
  287    289   
            .with_test_defaults()
  288         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         290  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         291  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         292  +
            .allow_no_auth()
  289    293   
            .endpoint_url("https://example.com");
  290    294   
  291    295   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  292    296   
        let result = client
  293    297   
            .nested_xml_maps()
  294    298   
            .set_flat_nested_map(::std::option::Option::Some({
  295    299   
                let mut ret = ::std::collections::HashMap::new();
  296    300   
                ret.insert("foo".to_owned(), {
  297    301   
                    let mut ret = ::std::collections::HashMap::new();
  298    302   
                    ret.insert(

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/no_input_and_no_output.rs

@@ -218,218 +278,280 @@
  238    238   
mod no_input_and_no_output_test {
  239    239   
  240    240   
    /// No input serializes no payload
  241    241   
    /// Test ID: NoInputAndNoOutput
  242    242   
    #[::tokio::test]
  243    243   
    #[::tracing_test::traced_test]
  244    244   
    async fn no_input_and_no_output_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.no_input_and_no_output().send().await;
  253    255   
        let _ = dbg!(result);
  254    256   
        let http_request = request_receiver.expect_request();
  255    257   
        let body = http_request.body().bytes().expect("body should be strict");
  256    258   
        // No body.
  257    259   
        ::pretty_assertions::assert_eq!(&body, &::bytes::Bytes::new());
  258    260   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/no_input_and_output.rs

@@ -218,218 +278,280 @@
  238    238   
mod no_input_and_output_test {
  239    239   
  240    240   
    /// No input serializes no payload
  241    241   
    /// Test ID: NoInputAndOutput
  242    242   
    #[::tokio::test]
  243    243   
    #[::tracing_test::traced_test]
  244    244   
    async fn no_input_and_output_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.no_input_and_output().send().await;
  253    255   
        let _ = dbg!(result);
  254    256   
        let http_request = request_receiver.expect_request();
  255    257   
        let body = http_request.body().bytes().expect("body should be strict");
  256    258   
        // No body.
  257    259   
        ::pretty_assertions::assert_eq!(&body, &::bytes::Bytes::new());
  258    260   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/null_and_empty_headers_client.rs

@@ -219,219 +279,281 @@
  239    239   
mod null_and_empty_headers_client_test {
  240    240   
  241    241   
    /// Do not send null values, but do send empty strings and empty lists over the wire in headers
  242    242   
    /// Test ID: NullAndEmptyHeaders
  243    243   
    #[::tokio::test]
  244    244   
    #[::tracing_test::traced_test]
  245    245   
    async fn null_and_empty_headers_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   
            .null_and_empty_headers_client()
  255    257   
            .set_a(::std::option::Option::None)
  256    258   
            .set_b(::std::option::Option::Some("".to_owned()))
  257    259   
            .set_c(::std::option::Option::Some(vec![]))
  258    260   
            .send()
  259    261   
            .await;

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/omits_null_serializes_empty_string.rs

@@ -238,238 +325,329 @@
  258    258   
mod omits_null_serializes_empty_string_test {
  259    259   
  260    260   
    /// Omits null query values
  261    261   
    /// Test ID: RestXmlOmitsNullQuery
  262    262   
    #[::tokio::test]
  263    263   
    #[::tracing_test::traced_test]
  264    264   
    async fn rest_xml_omits_null_query_request() {
  265    265   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  266    266   
        let config_builder = crate::config::Config::builder()
  267    267   
            .with_test_defaults()
  268         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         268  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         269  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         270  +
            .allow_no_auth()
  269    271   
            .endpoint_url("https://example.com");
  270    272   
  271    273   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  272    274   
        let result = client
  273    275   
            .omits_null_serializes_empty_string()
  274    276   
            .set_null_value(::std::option::Option::None)
  275    277   
            .send()
  276    278   
            .await;
  277    279   
        let _ = dbg!(result);
  278    280   
        let http_request = request_receiver.expect_request();
  279    281   
        let body = http_request.body().bytes().expect("body should be strict");
  280    282   
        // No body.
  281    283   
        ::pretty_assertions::assert_eq!(&body, &::bytes::Bytes::new());
  282    284   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  283    285   
        ::pretty_assertions::assert_eq!(http_request.method(), "GET", "method was incorrect");
  284    286   
        ::pretty_assertions::assert_eq!(uri.path(), "/OmitsNullSerializesEmptyString", "path was incorrect");
  285    287   
    }
  286    288   
  287    289   
    /// Serializes empty query strings
  288    290   
    /// Test ID: RestXmlSerializesEmptyString
  289    291   
    #[::tokio::test]
  290    292   
    #[::tracing_test::traced_test]
  291    293   
    async fn rest_xml_serializes_empty_string_request() {
  292    294   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  293    295   
        let config_builder = crate::config::Config::builder()
  294    296   
            .with_test_defaults()
  295         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         297  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         298  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         299  +
            .allow_no_auth()
  296    300   
            .endpoint_url("https://example.com");
  297    301   
  298    302   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  299    303   
        let result = client
  300    304   
            .omits_null_serializes_empty_string()
  301    305   
            .set_empty_string(::std::option::Option::Some("".to_owned()))
  302    306   
            .send()
  303    307   
            .await;
  304    308   
        let _ = dbg!(result);
  305    309   
        let http_request = request_receiver.expect_request();

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

@@ -225,225 +316,320 @@
  245    245   
mod put_with_content_encoding_test {
  246    246   
  247    247   
    /// Compression algorithm encoding is appended to the Content-Encoding header.
  248    248   
    /// Test ID: SDKAppliedContentEncoding_restXml
  249    249   
    #[::tokio::test]
  250    250   
    #[::tracing_test::traced_test]
  251    251   
    async fn sdk_applied_content_encoding_rest_xml_request() {
  252    252   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  253    253   
        let config_builder = crate::config::Config::builder()
  254    254   
            .with_test_defaults()
  255         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         255  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         256  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         257  +
            .allow_no_auth()
  256    258   
            .endpoint_url("https://example.com");
  257    259   
  258    260   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  259    261   
        let result = client.put_with_content_encoding()
  260    262   
        .set_data(
  261    263   
            ::std::option::Option::Some(
  262    264   
                "RjCEL3kBwqPivZUXGiyA5JCujtWgJAkKRlnTEsNYfBRGOS0f7LT6R3bCSOXeJ4auSHzQ4BEZZTklUyj5\n1HEojihShQC2jkQJrNdGOZNSW49yRO0XbnGmeczUHbZqZRelLFKW4xjru9uTuB8lFCtwoGgciFsgqTF8\n5HYcoqINTRxuAwGuRUMoNO473QT0BtCQoKUkAyVaypG0hBZdGNoJhunBfW0d3HWTYlzz9pXElyZhq3C1\n2PDB17GEoOYXmTxDecysmPOdo5z6T0HFhujfeJFIQQ8dirmXcG4F3v0bZdf6AZ3jsiVh6RnEXIPxPbOi\ngIXDWTMUr4Pg3f2LdYCM01eAb2qTdgsEN0MUDhEIfn68I2tnWvcozyUFpg1ez6pyWP8ssWVfFrckREIM\nMb0cTUVqSVSM8bnFiF9SoXM6ZoGMKfX1mT708OYk7SqZ1JlCTkecDJDoR5ED2q2MWKUGR6jjnEV0GtD8\nWJO6AcF0DptY9Hk16Bav3z6c5FeBvrGDrxTFVgRUk8SychzjrcqJ4qskwN8rL3zslC0oqobQRnLFOvwJ\nprSzBIwdH2yAuxokXAdVRa1u9NGNRvfWJfKkwbbVz8yV76RUF9KNhAUmwyYDrLnxNj8ROl8B7dv8Gans\n7Bit52wcd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RiQkp9fzBXf3CMk01dWjOMMIEXTeKzIQe\nEcffzjixWU9FpAyGp2rVl4ETRgqljOGw4UgK31r0ZIEGnH0xGz1FtbW1OcQM008JVujRqulCucEMmntr\n".to_owned()
  263    265   
            )
  264    266   
        )
  265    267   
        .send().await;
  266    268   
        let _ = dbg!(result);
  267    269   
        let http_request = request_receiver.expect_request();
  268    270   
        let expected_headers = [("Content-Encoding", "gzip")];
  269    271   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  270    272   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  271    273   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  272    274   
        ::pretty_assertions::assert_eq!(uri.path(), "/requestcompression/putcontentwithencoding", "path was incorrect");
  273    275   
    }
  274    276   
  275    277   
    /// Compression algorithm encoding is appended to the Content-Encoding header, and the
  276    278   
    /// user-provided content-encoding is in the Content-Encoding header before the
  277    279   
    /// request compression encoding from the HTTP binding.
  278    280   
    ///
  279    281   
    /// Test ID: SDKAppendedGzipAfterProvidedEncoding_restXml
  280    282   
    #[::tokio::test]
  281    283   
    #[::tracing_test::traced_test]
  282    284   
    async fn sdk_appended_gzip_after_provided_encoding_rest_xml_request() {
  283    285   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  284    286   
        let config_builder = crate::config::Config::builder()
  285    287   
            .with_test_defaults()
  286         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         288  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         289  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         290  +
            .allow_no_auth()
  287    291   
            .endpoint_url("https://example.com");
  288    292   
  289    293   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  290    294   
        let result = client.put_with_content_encoding()
  291    295   
        .set_encoding(
  292    296   
            ::std::option::Option::Some(
  293    297   
                "custom".to_owned()
  294    298   
            )
  295    299   
        )
  296    300   
        .set_data(

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/query_idempotency_token_auto_fill.rs

@@ -239,239 +324,328 @@
  259    259   
mod query_idempotency_token_auto_fill_test {
  260    260   
  261    261   
    /// Automatically adds idempotency token when not set
  262    262   
    /// Test ID: QueryIdempotencyTokenAutoFill
  263    263   
    #[::tokio::test]
  264    264   
    #[::tracing_test::traced_test]
  265    265   
    async fn query_idempotency_token_auto_fill_request() {
  266    266   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  267    267   
        let config_builder = crate::config::Config::builder()
  268    268   
            .with_test_defaults()
  269         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         269  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         270  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         271  +
            .allow_no_auth()
  270    272   
            .endpoint_url("https://example.com");
  271    273   
  272    274   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  273    275   
        let result = client.query_idempotency_token_auto_fill().send().await;
  274    276   
        let _ = dbg!(result);
  275    277   
        let http_request = request_receiver.expect_request();
  276    278   
        let expected_query_params = &["token=00000000-0000-4000-8000-000000000000"];
  277    279   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_query_string(&http_request, expected_query_params));
  278    280   
        let body = http_request.body().bytes().expect("body should be strict");
  279    281   
        // No body.
  280    282   
        ::pretty_assertions::assert_eq!(&body, &::bytes::Bytes::new());
  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(), "/QueryIdempotencyTokenAutoFill", "path was incorrect");
  284    286   
    }
  285    287   
  286    288   
    /// Uses the given idempotency token as-is
  287    289   
    /// Test ID: QueryIdempotencyTokenAutoFillIsSet
  288    290   
    #[::tokio::test]
  289    291   
    #[::tracing_test::traced_test]
  290    292   
    async fn query_idempotency_token_auto_fill_is_set_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   
            .query_idempotency_token_auto_fill()
  300    304   
            .set_token(::std::option::Option::Some("00000000-0000-4000-8000-000000000000".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/rest_xml/rust-client-codegen/src/operation/query_params_as_string_list_map.rs

@@ -243,243 +303,305 @@
  263    263   
mod query_params_as_string_list_map_test {
  264    264   
  265    265   
    /// Serialize query params from map of list strings
  266    266   
    /// Test ID: RestXmlQueryParamsStringListMap
  267    267   
    #[::tokio::test]
  268    268   
    #[::tracing_test::traced_test]
  269    269   
    async fn rest_xml_query_params_string_list_map_request() {
  270    270   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  271    271   
        let config_builder = crate::config::Config::builder()
  272    272   
            .with_test_defaults()
  273         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         273  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         274  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         275  +
            .allow_no_auth()
  274    276   
            .endpoint_url("https://example.com");
  275    277   
  276    278   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  277    279   
        let result = client
  278    280   
            .query_params_as_string_list_map()
  279    281   
            .set_qux(::std::option::Option::Some("named".to_owned()))
  280    282   
            .set_foo(::std::option::Option::Some({
  281    283   
                let mut ret = ::std::collections::HashMap::new();
  282    284   
                ret.insert("baz".to_owned(), vec!["bar".to_owned(), "qux".to_owned()]);
  283    285   
                ret

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/query_precedence.rs

@@ -235,235 +295,297 @@
  255    255   
mod query_precedence_test {
  256    256   
  257    257   
    /// Prefer named query parameters when serializing
  258    258   
    /// Test ID: RestXmlQueryPrecedence
  259    259   
    #[::tokio::test]
  260    260   
    #[::tracing_test::traced_test]
  261    261   
    async fn rest_xml_query_precedence_request() {
  262    262   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  263    263   
        let config_builder = crate::config::Config::builder()
  264    264   
            .with_test_defaults()
  265         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         265  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         266  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         267  +
            .allow_no_auth()
  266    268   
            .endpoint_url("https://example.com");
  267    269   
  268    270   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  269    271   
        let result = client
  270    272   
            .query_precedence()
  271    273   
            .set_foo(::std::option::Option::Some("named".to_owned()))
  272    274   
            .set_baz(::std::option::Option::Some({
  273    275   
                let mut ret = ::std::collections::HashMap::new();
  274    276   
                ret.insert("bar".to_owned(), "fromMap".to_owned());
  275    277   
                ret.insert("qux".to_owned(), "alsoFromMap".to_owned());

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/recursive_shapes.rs

@@ -216,216 +276,278 @@
  236    236   
mod recursive_shapes_test {
  237    237   
  238    238   
    /// Serializes recursive structures
  239    239   
    /// Test ID: RecursiveShapes
  240    240   
    #[::tokio::test]
  241    241   
    #[::tracing_test::traced_test]
  242    242   
    async fn recursive_shapes_request() {
  243    243   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  244    244   
        let config_builder = crate::config::Config::builder()
  245    245   
            .with_test_defaults()
  246         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         246  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         247  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         248  +
            .allow_no_auth()
  247    249   
            .endpoint_url("https://example.com");
  248    250   
  249    251   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  250    252   
        let result = client
  251    253   
            .recursive_shapes()
  252    254   
            .set_nested(::std::option::Option::Some(
  253    255   
                crate::types::RecursiveShapesInputOutputNested1::builder()
  254    256   
                    .set_foo(::std::option::Option::Some("Foo1".to_owned()))
  255    257   
                    .set_nested(::std::option::Option::Some(::std::boxed::Box::new(
  256    258   
                        crate::types::RecursiveShapesInputOutputNested2::builder()

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

@@ -226,226 +494,508 @@
  246    246   
    use ::aws_smithy_protocol_test::FloatEquals;
  247    247   
  248    248   
    /// Serializes simple scalar properties
  249    249   
    /// Test ID: SimpleScalarProperties
  250    250   
    #[::tokio::test]
  251    251   
    #[::tracing_test::traced_test]
  252    252   
    async fn simple_scalar_properties_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");
  258    260   
  259    261   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  260    262   
        let result = client
  261    263   
            .simple_scalar_properties()
  262    264   
            .set_foo(::std::option::Option::Some("Foo".to_owned()))
  263    265   
            .set_string_value(::std::option::Option::Some("string".to_owned()))
  264    266   
            .set_true_boolean_value(::std::option::Option::Some(true))
  265    267   
            .set_false_boolean_value(::std::option::Option::Some(false))
  266    268   
            .set_byte_value(::std::option::Option::Some(1))
  267    269   
            .set_short_value(::std::option::Option::Some(2))
  268    270   
            .set_integer_value(::std::option::Option::Some(3))
  269    271   
            .set_long_value(::std::option::Option::Some(4))
  270    272   
            .set_float_value(::std::option::Option::Some(5.5_f32))
  271    273   
            .set_double_value(::std::option::Option::Some(6.5_f64))
  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 = [("Content-Type", "application/xml"), ("X-Foo", "Foo")];
  277    279   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  278    280   
        let body = http_request.body().bytes().expect("body should be strict");
  279    281   
        ::aws_smithy_protocol_test::assert_ok(
  280    282   
        ::aws_smithy_protocol_test::validate_body(body, "<SimpleScalarPropertiesRequest>\n    <stringValue>string</stringValue>\n    <trueBooleanValue>true</trueBooleanValue>\n    <falseBooleanValue>false</falseBooleanValue>\n    <byteValue>1</byteValue>\n    <shortValue>2</shortValue>\n    <integerValue>3</integerValue>\n    <longValue>4</longValue>\n    <floatValue>5.5</floatValue>\n    <DoubleDribble>6.5</DoubleDribble>\n</SimpleScalarPropertiesRequest>\n", ::aws_smithy_protocol_test::MediaType::from("application/xml"))
  281    283   
        );
  282    284   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  283    285   
        ::pretty_assertions::assert_eq!(http_request.method(), "PUT", "method was incorrect");
  284    286   
        ::pretty_assertions::assert_eq!(uri.path(), "/SimpleScalarProperties", "path was incorrect");
  285    287   
    }
  286    288   
  287    289   
    /// Serializes string with escaping
  288    290   
    /// Test ID: SimpleScalarPropertiesWithEscapedCharacter
  289    291   
    #[::tokio::test]
  290    292   
    #[::tracing_test::traced_test]
  291    293   
    async fn simple_scalar_properties_with_escaped_character_request() {
  292    294   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  293    295   
        let config_builder = crate::config::Config::builder()
  294    296   
            .with_test_defaults()
  295         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         297  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         298  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         299  +
            .allow_no_auth()
  296    300   
            .endpoint_url("https://example.com");
  297    301   
  298    302   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  299    303   
        let result = client
  300    304   
            .simple_scalar_properties()
  301    305   
            .set_foo(::std::option::Option::Some("Foo".to_owned()))
  302    306   
            .set_string_value(::std::option::Option::Some("<string>".to_owned()))
  303    307   
            .send()
  304    308   
            .await;
  305    309   
        let _ = dbg!(result);
  306    310   
        let http_request = request_receiver.expect_request();
  307    311   
        let expected_headers = [("Content-Type", "application/xml"), ("X-Foo", "Foo")];
  308    312   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  309    313   
        let body = http_request.body().bytes().expect("body should be strict");
  310    314   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
  311    315   
            body,
  312    316   
            "<SimpleScalarPropertiesRequest>\n    <stringValue>&lt;string&gt;</stringValue>\n</SimpleScalarPropertiesRequest>\n",
  313    317   
            ::aws_smithy_protocol_test::MediaType::from("application/xml"),
  314    318   
        ));
  315    319   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  316    320   
        ::pretty_assertions::assert_eq!(http_request.method(), "PUT", "method was incorrect");
  317    321   
        ::pretty_assertions::assert_eq!(uri.path(), "/SimpleScalarProperties", "path was incorrect");
  318    322   
    }
  319    323   
  320    324   
    /// Serializes string containing white space
  321    325   
    /// Test ID: SimpleScalarPropertiesWithWhiteSpace
  322    326   
    #[::tokio::test]
  323    327   
    #[::tracing_test::traced_test]
  324    328   
    async fn simple_scalar_properties_with_white_space_request() {
  325    329   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  326    330   
        let config_builder = crate::config::Config::builder()
  327    331   
            .with_test_defaults()
  328         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         332  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         333  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         334  +
            .allow_no_auth()
  329    335   
            .endpoint_url("https://example.com");
  330    336   
  331    337   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  332    338   
        let result = client
  333    339   
            .simple_scalar_properties()
  334    340   
            .set_foo(::std::option::Option::Some("Foo".to_owned()))
  335    341   
            .set_string_value(::std::option::Option::Some("  string with white    space  ".to_owned()))
  336    342   
            .send()
  337    343   
            .await;
  338    344   
        let _ = dbg!(result);
  339    345   
        let http_request = request_receiver.expect_request();
  340    346   
        let expected_headers = [("Content-Type", "application/xml"), ("X-Foo", "Foo")];
  341    347   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  342    348   
        let body = http_request.body().bytes().expect("body should be strict");
  343    349   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
  344    350   
            body,
  345    351   
            "<SimpleScalarPropertiesRequest>\n    <stringValue>  string with white    space  </stringValue>\n</SimpleScalarPropertiesRequest>\n",
  346    352   
            ::aws_smithy_protocol_test::MediaType::from("application/xml"),
  347    353   
        ));
  348    354   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  349    355   
        ::pretty_assertions::assert_eq!(http_request.method(), "PUT", "method was incorrect");
  350    356   
        ::pretty_assertions::assert_eq!(uri.path(), "/SimpleScalarProperties", "path was incorrect");
  351    357   
    }
  352    358   
  353    359   
    /// Serializes string containing exclusively whitespace
  354    360   
    /// Test ID: SimpleScalarPropertiesPureWhiteSpace
  355    361   
    #[::tokio::test]
  356    362   
    #[::tracing_test::traced_test]
  357    363   
    async fn simple_scalar_properties_pure_white_space_request() {
  358    364   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  359    365   
        let config_builder = crate::config::Config::builder()
  360    366   
            .with_test_defaults()
  361         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         367  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         368  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         369  +
            .allow_no_auth()
  362    370   
            .endpoint_url("https://example.com");
  363    371   
  364    372   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  365    373   
        let result = client
  366    374   
            .simple_scalar_properties()
  367    375   
            .set_foo(::std::option::Option::Some("Foo".to_owned()))
  368    376   
            .set_string_value(::std::option::Option::Some("   ".to_owned()))
  369    377   
            .send()
  370    378   
            .await;
  371    379   
        let _ = dbg!(result);
  372    380   
        let http_request = request_receiver.expect_request();
  373    381   
        let expected_headers = [("Content-Type", "application/xml"), ("X-Foo", "Foo")];
  374    382   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  375    383   
        let body = http_request.body().bytes().expect("body should be strict");
  376    384   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
  377    385   
            body,
  378    386   
            "<SimpleScalarPropertiesRequest>\n    <stringValue>   </stringValue>\n</SimpleScalarPropertiesRequest>\n",
  379    387   
            ::aws_smithy_protocol_test::MediaType::from("application/xml"),
  380    388   
        ));
  381    389   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  382    390   
        ::pretty_assertions::assert_eq!(http_request.method(), "PUT", "method was incorrect");
  383    391   
        ::pretty_assertions::assert_eq!(uri.path(), "/SimpleScalarProperties", "path was incorrect");
  384    392   
    }
  385    393   
  386    394   
    /// Supports handling NaN float values.
  387    395   
    /// Test ID: RestXmlSupportsNaNFloatInputs
  388    396   
    #[::tokio::test]
  389    397   
    #[::tracing_test::traced_test]
  390    398   
    async fn rest_xml_supports_na_n_float_inputs_request() {
  391    399   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  392    400   
        let config_builder = crate::config::Config::builder()
  393    401   
            .with_test_defaults()
  394         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         402  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         403  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         404  +
            .allow_no_auth()
  395    405   
            .endpoint_url("https://example.com");
  396    406   
  397    407   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  398    408   
        let result = client
  399    409   
            .simple_scalar_properties()
  400    410   
            .set_float_value(::std::option::Option::Some(
  401    411   
                <f32 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive("NaN").expect("invalid string for number"),
  402    412   
            ))
  403    413   
            .set_double_value(::std::option::Option::Some(
  404    414   
                <f64 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive("NaN").expect("invalid string for number"),
  405    415   
            ))
  406    416   
            .send()
  407    417   
            .await;
  408    418   
        let _ = dbg!(result);
  409    419   
        let http_request = request_receiver.expect_request();
  410    420   
        let expected_headers = [("Content-Type", "application/xml")];
  411    421   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  412    422   
        let body = http_request.body().bytes().expect("body should be strict");
  413    423   
        ::aws_smithy_protocol_test::assert_ok(
  414    424   
        ::aws_smithy_protocol_test::validate_body(body, "<SimpleScalarPropertiesRequest>\n    <floatValue>NaN</floatValue>\n    <DoubleDribble>NaN</DoubleDribble>\n</SimpleScalarPropertiesRequest>\n", ::aws_smithy_protocol_test::MediaType::from("application/xml"))
  415    425   
        );
  416    426   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  417    427   
        ::pretty_assertions::assert_eq!(http_request.method(), "PUT", "method was incorrect");
  418    428   
        ::pretty_assertions::assert_eq!(uri.path(), "/SimpleScalarProperties", "path was incorrect");
  419    429   
    }
  420    430   
  421    431   
    /// Supports handling Infinity float values.
  422    432   
    /// Test ID: RestXmlSupportsInfinityFloatInputs
  423    433   
    #[::tokio::test]
  424    434   
    #[::tracing_test::traced_test]
  425    435   
    async fn rest_xml_supports_infinity_float_inputs_request() {
  426    436   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  427    437   
        let config_builder = crate::config::Config::builder()
  428    438   
            .with_test_defaults()
  429         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         439  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         440  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         441  +
            .allow_no_auth()
  430    442   
            .endpoint_url("https://example.com");
  431    443   
  432    444   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  433    445   
        let result = client
  434    446   
            .simple_scalar_properties()
  435    447   
            .set_float_value(::std::option::Option::Some(
  436    448   
                <f32 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive("Infinity").expect("invalid string for number"),
  437    449   
            ))
  438    450   
            .set_double_value(::std::option::Option::Some(
  439    451   
                <f64 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive("Infinity").expect("invalid string for number"),
  440    452   
            ))
  441    453   
            .send()
  442    454   
            .await;
  443    455   
        let _ = dbg!(result);
  444    456   
        let http_request = request_receiver.expect_request();
  445    457   
        let expected_headers = [("Content-Type", "application/xml")];
  446    458   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  447    459   
        let body = http_request.body().bytes().expect("body should be strict");
  448    460   
        ::aws_smithy_protocol_test::assert_ok(
  449    461   
        ::aws_smithy_protocol_test::validate_body(body, "<SimpleScalarPropertiesRequest>\n    <floatValue>Infinity</floatValue>\n    <DoubleDribble>Infinity</DoubleDribble>\n</SimpleScalarPropertiesRequest>\n", ::aws_smithy_protocol_test::MediaType::from("application/xml"))
  450    462   
        );
  451    463   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  452    464   
        ::pretty_assertions::assert_eq!(http_request.method(), "PUT", "method was incorrect");
  453    465   
        ::pretty_assertions::assert_eq!(uri.path(), "/SimpleScalarProperties", "path was incorrect");
  454    466   
    }
  455    467   
  456    468   
    /// Supports handling -Infinity float values.
  457    469   
    /// Test ID: RestXmlSupportsNegativeInfinityFloatInputs
  458    470   
    #[::tokio::test]
  459    471   
    #[::tracing_test::traced_test]
  460    472   
    async fn rest_xml_supports_negative_infinity_float_inputs_request() {
  461    473   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  462    474   
        let config_builder = crate::config::Config::builder()
  463    475   
            .with_test_defaults()
  464         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         476  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         477  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         478  +
            .allow_no_auth()
  465    479   
            .endpoint_url("https://example.com");
  466    480   
  467    481   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  468    482   
        let result = client
  469    483   
            .simple_scalar_properties()
  470    484   
            .set_float_value(::std::option::Option::Some(
  471    485   
                <f32 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive("-Infinity").expect("invalid string for number"),
  472    486   
            ))
  473    487   
            .set_double_value(::std::option::Option::Some(
  474    488   
                <f64 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive("-Infinity").expect("invalid string for number"),

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/timestamp_format_headers.rs

@@ -219,219 +279,281 @@
  239    239   
mod timestamp_format_headers_test {
  240    240   
  241    241   
    /// Tests how timestamp request headers are serialized
  242    242   
    /// Test ID: TimestampFormatHeaders
  243    243   
    #[::tokio::test]
  244    244   
    #[::tracing_test::traced_test]
  245    245   
    async fn timestamp_format_headers_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   
            .timestamp_format_headers()
  255    257   
            .set_member_epoch_seconds(::std::option::Option::Some(::aws_smithy_types::DateTime::from_fractional_secs(
  256    258   
                1576540098, 0_f64,
  257    259   
            )))
  258    260   
            .set_member_http_date(::std::option::Option::Some(::aws_smithy_types::DateTime::from_fractional_secs(
  259    261   
                1576540098, 0_f64,

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/xml_attributes.rs

@@ -216,216 +309,313 @@
  236    236   
mod xml_attributes_test {
  237    237   
  238    238   
    /// Serializes XML attributes on the synthesized document
  239    239   
    /// Test ID: XmlAttributes
  240    240   
    #[::tokio::test]
  241    241   
    #[::tracing_test::traced_test]
  242    242   
    async fn xml_attributes_request() {
  243    243   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  244    244   
        let config_builder = crate::config::Config::builder()
  245    245   
            .with_test_defaults()
  246         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         246  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         247  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         248  +
            .allow_no_auth()
  247    249   
            .endpoint_url("https://example.com");
  248    250   
  249    251   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  250    252   
        let result = client
  251    253   
            .xml_attributes()
  252    254   
            .set_foo(::std::option::Option::Some("hi".to_owned()))
  253    255   
            .set_attr(::std::option::Option::Some("test".to_owned()))
  254    256   
            .send()
  255    257   
            .await;
  256    258   
        let _ = dbg!(result);
  257    259   
        let http_request = request_receiver.expect_request();
  258    260   
        let expected_headers = [("Content-Type", "application/xml")];
  259    261   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  260    262   
        let body = http_request.body().bytes().expect("body should be strict");
  261    263   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
  262    264   
            body,
  263    265   
            "<XmlAttributesRequest test=\"test\">\n    <foo>hi</foo>\n</XmlAttributesRequest>\n",
  264    266   
            ::aws_smithy_protocol_test::MediaType::from("application/xml"),
  265    267   
        ));
  266    268   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  267    269   
        ::pretty_assertions::assert_eq!(http_request.method(), "PUT", "method was incorrect");
  268    270   
        ::pretty_assertions::assert_eq!(uri.path(), "/XmlAttributes", "path was incorrect");
  269    271   
    }
  270    272   
  271    273   
    /// Serializes XML attributes with escaped characters on the synthesized document
  272    274   
    /// Test ID: XmlAttributesWithEscaping
  273    275   
    #[::tokio::test]
  274    276   
    #[::tracing_test::traced_test]
  275    277   
    async fn xml_attributes_with_escaping_request() {
  276    278   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  277    279   
        let config_builder = crate::config::Config::builder()
  278    280   
            .with_test_defaults()
  279         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         281  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         282  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         283  +
            .allow_no_auth()
  280    284   
            .endpoint_url("https://example.com");
  281    285   
  282    286   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  283    287   
        let result = client
  284    288   
            .xml_attributes()
  285    289   
            .set_foo(::std::option::Option::Some("hi".to_owned()))
  286    290   
            .set_attr(::std::option::Option::Some("<test&mock>".to_owned()))
  287    291   
            .send()
  288    292   
            .await;
  289    293   
        let _ = dbg!(result);

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/xml_attributes_on_payload.rs

@@ -224,224 +284,286 @@
  244    244   
mod xml_attributes_on_payload_test {
  245    245   
  246    246   
    /// Serializes XML attributes on the synthesized document
  247    247   
    /// Test ID: XmlAttributesOnPayload
  248    248   
    #[::tokio::test]
  249    249   
    #[::tracing_test::traced_test]
  250    250   
    async fn xml_attributes_on_payload_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
  259    261   
            .xml_attributes_on_payload()
  260    262   
            .set_payload(::std::option::Option::Some(
  261    263   
                crate::types::XmlAttributesPayloadRequest::builder()
  262    264   
                    .set_foo(::std::option::Option::Some("hi".to_owned()))
  263    265   
                    .set_attr(::std::option::Option::Some("test".to_owned()))
  264    266   
                    .build(),