Client Test

Client Test

rev. 26e0a1e8aaec58e3c7fd18a79449d71bcadaf391

Files changed:

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

@@ -210,210 +270,272 @@
  230    230   
mod xml_blobs_test {
  231    231   
  232    232   
    /// Blobs are base64 encoded
  233    233   
    /// Test ID: XmlBlobs
  234    234   
    #[::tokio::test]
  235    235   
    #[::tracing_test::traced_test]
  236    236   
    async fn xml_blobs_request() {
  237    237   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  238    238   
        let config_builder = crate::config::Config::builder()
  239    239   
            .with_test_defaults()
  240         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         240  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         241  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         242  +
            .allow_no_auth()
  241    243   
            .endpoint_url("https://example.com");
  242    244   
  243    245   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  244    246   
        let result = client
  245    247   
            .xml_blobs()
  246    248   
            .set_data(::std::option::Option::Some(::aws_smithy_types::Blob::new("value")))
  247    249   
            .send()
  248    250   
            .await;
  249    251   
        let _ = dbg!(result);
  250    252   
        let http_request = request_receiver.expect_request();

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

@@ -216,216 +276,278 @@
  236    236   
mod xml_empty_lists_test {
  237    237   
  238    238   
    /// Serializes Empty XML lists
  239    239   
    /// Test ID: XmlEmptyLists
  240    240   
    #[::tokio::test]
  241    241   
    #[::tracing_test::traced_test]
  242    242   
    async fn xml_empty_lists_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_empty_lists()
  252    254   
            .set_string_list(::std::option::Option::Some(vec![]))
  253    255   
            .set_string_set(::std::option::Option::Some(vec![]))
  254    256   
            .send()
  255    257   
            .await;
  256    258   
        let _ = dbg!(result);

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

@@ -216,216 +276,278 @@
  236    236   
mod xml_empty_maps_test {
  237    237   
  238    238   
    /// Serializes Empty XML maps
  239    239   
    /// Test ID: XmlEmptyMaps
  240    240   
    #[::tokio::test]
  241    241   
    #[::tracing_test::traced_test]
  242    242   
    async fn xml_empty_maps_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_empty_maps()
  252    254   
            .set_my_map(::std::option::Option::Some(::std::collections::HashMap::new()))
  253    255   
            .send()
  254    256   
            .await;
  255    257   
        let _ = dbg!(result);
  256    258   
        let http_request = request_receiver.expect_request();

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

@@ -216,216 +276,278 @@
  236    236   
mod xml_empty_strings_test {
  237    237   
  238    238   
    /// Serializes xml empty strings
  239    239   
    /// Test ID: XmlEmptyStrings
  240    240   
    #[::tokio::test]
  241    241   
    #[::tracing_test::traced_test]
  242    242   
    async fn xml_empty_strings_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_empty_strings()
  252    254   
            .set_empty_string(::std::option::Option::Some("".to_owned()))
  253    255   
            .send()
  254    256   
            .await;
  255    257   
        let _ = dbg!(result);
  256    258   
        let http_request = request_receiver.expect_request();

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

@@ -210,210 +270,272 @@
  230    230   
mod xml_enums_test {
  231    231   
  232    232   
    /// Serializes simple scalar properties
  233    233   
    /// Test ID: XmlEnums
  234    234   
    #[::tokio::test]
  235    235   
    #[::tracing_test::traced_test]
  236    236   
    async fn xml_enums_request() {
  237    237   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  238    238   
        let config_builder = crate::config::Config::builder()
  239    239   
            .with_test_defaults()
  240         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         240  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         241  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         242  +
            .allow_no_auth()
  241    243   
            .endpoint_url("https://example.com");
  242    244   
  243    245   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  244    246   
        let result = client
  245    247   
            .xml_enums()
  246    248   
            .set_foo_enum1(::std::option::Option::Some(
  247    249   
                "Foo".parse::<crate::types::FooEnum>().expect("static value validated to member"),
  248    250   
            ))
  249    251   
            .set_foo_enum2(::std::option::Option::Some(
  250    252   
                "0".parse::<crate::types::FooEnum>().expect("static value validated to member"),

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

@@ -216,216 +276,278 @@
  236    236   
mod xml_int_enums_test {
  237    237   
  238    238   
    /// Serializes simple scalar properties
  239    239   
    /// Test ID: XmlIntEnums
  240    240   
    #[::tokio::test]
  241    241   
    #[::tracing_test::traced_test]
  242    242   
    async fn xml_int_enums_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_int_enums()
  252    254   
            .set_int_enum1(::std::option::Option::Some(1))
  253    255   
            .set_int_enum2(::std::option::Option::Some(2))
  254    256   
            .set_int_enum3(::std::option::Option::Some(3))
  255    257   
            .set_int_enum_list(::std::option::Option::Some(vec![1, 2]))
  256    258   
            .set_int_enum_set(::std::option::Option::Some(vec![1, 2]))

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

@@ -210,210 +270,272 @@
  230    230   
mod xml_lists_test {
  231    231   
  232    232   
    /// Tests for XML list serialization
  233    233   
    /// Test ID: XmlLists
  234    234   
    #[::tokio::test]
  235    235   
    #[::tracing_test::traced_test]
  236    236   
    async fn xml_lists_request() {
  237    237   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  238    238   
        let config_builder = crate::config::Config::builder()
  239    239   
            .with_test_defaults()
  240         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         240  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         241  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         242  +
            .allow_no_auth()
  241    243   
            .endpoint_url("https://example.com");
  242    244   
  243    245   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  244    246   
        let result = client
  245    247   
            .xml_lists()
  246    248   
            .set_string_list(::std::option::Option::Some(vec!["foo".to_owned(), "bar".to_owned()]))
  247    249   
            .set_string_set(::std::option::Option::Some(vec!["foo".to_owned(), "bar".to_owned()]))
  248    250   
            .set_integer_list(::std::option::Option::Some(vec![1, 2]))
  249    251   
            .set_boolean_list(::std::option::Option::Some(vec![true, false]))
  250    252   
            .set_timestamp_list(::std::option::Option::Some(vec![

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

@@ -224,224 +284,286 @@
  244    244   
mod xml_map_with_xml_namespace_test {
  245    245   
  246    246   
    /// Serializes XML maps in requests that have xmlNamespace and xmlName on members
  247    247   
    /// Test ID: RestXmlXmlMapWithXmlNamespace
  248    248   
    #[::tokio::test]
  249    249   
    #[::tracing_test::traced_test]
  250    250   
    async fn rest_xml_xml_map_with_xml_namespace_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_map_with_xml_namespace()
  260    262   
            .set_my_map(::std::option::Option::Some({
  261    263   
                let mut ret = ::std::collections::HashMap::new();
  262    264   
                ret.insert("a".to_owned(), "A".to_owned());
  263    265   
                ret.insert("b".to_owned(), "B".to_owned());
  264    266   
                ret

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

@@ -210,210 +270,272 @@
  230    230   
mod xml_maps_test {
  231    231   
  232    232   
    /// Tests for XML map serialization
  233    233   
    /// Test ID: XmlMaps
  234    234   
    #[::tokio::test]
  235    235   
    #[::tracing_test::traced_test]
  236    236   
    async fn xml_maps_request() {
  237    237   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  238    238   
        let config_builder = crate::config::Config::builder()
  239    239   
            .with_test_defaults()
  240         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         240  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         241  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         242  +
            .allow_no_auth()
  241    243   
            .endpoint_url("https://example.com");
  242    244   
  243    245   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  244    246   
        let result = client
  245    247   
            .xml_maps()
  246    248   
            .set_my_map(::std::option::Option::Some({
  247    249   
                let mut ret = ::std::collections::HashMap::new();
  248    250   
                ret.insert(
  249    251   
                    "foo".to_owned(),
  250    252   
                    crate::types::GreetingStruct::builder()

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

@@ -216,216 +276,278 @@
  236    236   
mod xml_maps_xml_name_test {
  237    237   
  238    238   
    /// Serializes XML maps that have xmlName on members
  239    239   
    /// Test ID: XmlMapsXmlName
  240    240   
    #[::tokio::test]
  241    241   
    #[::tracing_test::traced_test]
  242    242   
    async fn xml_maps_xml_name_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_maps_xml_name()
  252    254   
            .set_my_map(::std::option::Option::Some({
  253    255   
                let mut ret = ::std::collections::HashMap::new();
  254    256   
                ret.insert(
  255    257   
                    "foo".to_owned(),
  256    258   
                    crate::types::GreetingStruct::builder()

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

@@ -216,216 +276,278 @@
  236    236   
mod xml_namespaces_test {
  237    237   
  238    238   
    /// Serializes XML namespaces
  239    239   
    /// Test ID: XmlNamespaces
  240    240   
    #[::tokio::test]
  241    241   
    #[::tracing_test::traced_test]
  242    242   
    async fn xml_namespaces_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_namespaces()
  252    254   
            .set_nested(::std::option::Option::Some(
  253    255   
                crate::types::XmlNamespaceNested::builder()
  254    256   
                    .set_foo(::std::option::Option::Some("Foo".to_owned()))
  255    257   
                    .set_values(::std::option::Option::Some(vec!["Bar".to_owned(), "Baz".to_owned()]))
  256    258   
                    .build(),

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

@@ -216,216 +480,494 @@
  236    236   
mod xml_timestamps_test {
  237    237   
  238    238   
    /// Tests how normal timestamps are serialized
  239    239   
    /// Test ID: XmlTimestamps
  240    240   
    #[::tokio::test]
  241    241   
    #[::tracing_test::traced_test]
  242    242   
    async fn xml_timestamps_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_timestamps()
  252    254   
            .set_normal(::std::option::Option::Some(::aws_smithy_types::DateTime::from_fractional_secs(
  253    255   
                1398796238, 0_f64,
  254    256   
            )))
  255    257   
            .send()
  256    258   
            .await;
  257    259   
        let _ = dbg!(result);
  258    260   
        let http_request = request_receiver.expect_request();
  259    261   
        let expected_headers = [("Content-Type", "application/xml")];
  260    262   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  261    263   
        let body = http_request.body().bytes().expect("body should be strict");
  262    264   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
  263    265   
            body,
  264    266   
            "<XmlTimestampsRequest>\n    <normal>2014-04-29T18:30:38Z</normal>\n</XmlTimestampsRequest>\n",
  265    267   
            ::aws_smithy_protocol_test::MediaType::from("application/xml"),
  266    268   
        ));
  267    269   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  268    270   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  269    271   
        ::pretty_assertions::assert_eq!(uri.path(), "/XmlTimestamps", "path was incorrect");
  270    272   
    }
  271    273   
  272    274   
    /// Ensures that the timestampFormat of date-time works like normal timestamps
  273    275   
    /// Test ID: XmlTimestampsWithDateTimeFormat
  274    276   
    #[::tokio::test]
  275    277   
    #[::tracing_test::traced_test]
  276    278   
    async fn xml_timestamps_with_date_time_format_request() {
  277    279   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  278    280   
        let config_builder = crate::config::Config::builder()
  279    281   
            .with_test_defaults()
  280         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         282  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         283  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         284  +
            .allow_no_auth()
  281    285   
            .endpoint_url("https://example.com");
  282    286   
  283    287   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  284    288   
        let result = client
  285    289   
            .xml_timestamps()
  286    290   
            .set_date_time(::std::option::Option::Some(::aws_smithy_types::DateTime::from_fractional_secs(
  287    291   
                1398796238, 0_f64,
  288    292   
            )))
  289    293   
            .send()
  290    294   
            .await;
  291    295   
        let _ = dbg!(result);
  292    296   
        let http_request = request_receiver.expect_request();
  293    297   
        let expected_headers = [("Content-Type", "application/xml")];
  294    298   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  295    299   
        let body = http_request.body().bytes().expect("body should be strict");
  296    300   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
  297    301   
            body,
  298    302   
            "<XmlTimestampsRequest>\n    <dateTime>2014-04-29T18:30:38Z</dateTime>\n</XmlTimestampsRequest>\n",
  299    303   
            ::aws_smithy_protocol_test::MediaType::from("application/xml"),
  300    304   
        ));
  301    305   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  302    306   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  303    307   
        ::pretty_assertions::assert_eq!(uri.path(), "/XmlTimestamps", "path was incorrect");
  304    308   
    }
  305    309   
  306    310   
    /// Ensures that the timestampFormat of date-time on the target shape works like normal timestamps
  307    311   
    /// Test ID: XmlTimestampsWithDateTimeOnTargetFormat
  308    312   
    #[::tokio::test]
  309    313   
    #[::tracing_test::traced_test]
  310    314   
    async fn xml_timestamps_with_date_time_on_target_format_request() {
  311    315   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  312    316   
        let config_builder = crate::config::Config::builder()
  313    317   
            .with_test_defaults()
  314         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         318  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         319  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         320  +
            .allow_no_auth()
  315    321   
            .endpoint_url("https://example.com");
  316    322   
  317    323   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  318    324   
        let result = client
  319    325   
            .xml_timestamps()
  320    326   
            .set_date_time_on_target(::std::option::Option::Some(::aws_smithy_types::DateTime::from_fractional_secs(
  321    327   
                1398796238, 0_f64,
  322    328   
            )))
  323    329   
            .send()
  324    330   
            .await;
  325    331   
        let _ = dbg!(result);
  326    332   
        let http_request = request_receiver.expect_request();
  327    333   
        let expected_headers = [("Content-Type", "application/xml")];
  328    334   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  329    335   
        let body = http_request.body().bytes().expect("body should be strict");
  330    336   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
  331    337   
            body,
  332    338   
            "<XmlTimestampsRequest>\n    <dateTimeOnTarget>2014-04-29T18:30:38Z</dateTimeOnTarget>\n</XmlTimestampsRequest>\n",
  333    339   
            ::aws_smithy_protocol_test::MediaType::from("application/xml"),
  334    340   
        ));
  335    341   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  336    342   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  337    343   
        ::pretty_assertions::assert_eq!(uri.path(), "/XmlTimestamps", "path was incorrect");
  338    344   
    }
  339    345   
  340    346   
    /// Ensures that the timestampFormat of epoch-seconds works
  341    347   
    /// Test ID: XmlTimestampsWithEpochSecondsFormat
  342    348   
    #[::tokio::test]
  343    349   
    #[::tracing_test::traced_test]
  344    350   
    async fn xml_timestamps_with_epoch_seconds_format_request() {
  345    351   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  346    352   
        let config_builder = crate::config::Config::builder()
  347    353   
            .with_test_defaults()
  348         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         354  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         355  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         356  +
            .allow_no_auth()
  349    357   
            .endpoint_url("https://example.com");
  350    358   
  351    359   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  352    360   
        let result = client
  353    361   
            .xml_timestamps()
  354    362   
            .set_epoch_seconds(::std::option::Option::Some(::aws_smithy_types::DateTime::from_fractional_secs(
  355    363   
                1398796238, 0_f64,
  356    364   
            )))
  357    365   
            .send()
  358    366   
            .await;
  359    367   
        let _ = dbg!(result);
  360    368   
        let http_request = request_receiver.expect_request();
  361    369   
        let expected_headers = [("Content-Type", "application/xml")];
  362    370   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  363    371   
        let body = http_request.body().bytes().expect("body should be strict");
  364    372   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
  365    373   
            body,
  366    374   
            "<XmlTimestampsRequest>\n    <epochSeconds>1398796238</epochSeconds>\n</XmlTimestampsRequest>\n",
  367    375   
            ::aws_smithy_protocol_test::MediaType::from("application/xml"),
  368    376   
        ));
  369    377   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  370    378   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  371    379   
        ::pretty_assertions::assert_eq!(uri.path(), "/XmlTimestamps", "path was incorrect");
  372    380   
    }
  373    381   
  374    382   
    /// Ensures that the timestampFormat of epoch-seconds on the target shape works
  375    383   
    /// Test ID: XmlTimestampsWithEpochSecondsOnTargetFormat
  376    384   
    #[::tokio::test]
  377    385   
    #[::tracing_test::traced_test]
  378    386   
    async fn xml_timestamps_with_epoch_seconds_on_target_format_request() {
  379    387   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  380    388   
        let config_builder = crate::config::Config::builder()
  381    389   
            .with_test_defaults()
  382         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         390  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         391  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         392  +
            .allow_no_auth()
  383    393   
            .endpoint_url("https://example.com");
  384    394   
  385    395   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  386    396   
        let result = client
  387    397   
            .xml_timestamps()
  388    398   
            .set_epoch_seconds_on_target(::std::option::Option::Some(::aws_smithy_types::DateTime::from_fractional_secs(
  389    399   
                1398796238, 0_f64,
  390    400   
            )))
  391    401   
            .send()
  392    402   
            .await;
  393    403   
        let _ = dbg!(result);
  394    404   
        let http_request = request_receiver.expect_request();
  395    405   
        let expected_headers = [("Content-Type", "application/xml")];
  396    406   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  397    407   
        let body = http_request.body().bytes().expect("body should be strict");
  398    408   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
  399    409   
            body,
  400    410   
            "<XmlTimestampsRequest>\n    <epochSecondsOnTarget>1398796238</epochSecondsOnTarget>\n</XmlTimestampsRequest>\n",
  401    411   
            ::aws_smithy_protocol_test::MediaType::from("application/xml"),
  402    412   
        ));
  403    413   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  404    414   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  405    415   
        ::pretty_assertions::assert_eq!(uri.path(), "/XmlTimestamps", "path was incorrect");
  406    416   
    }
  407    417   
  408    418   
    /// Ensures that the timestampFormat of http-date works
  409    419   
    /// Test ID: XmlTimestampsWithHttpDateFormat
  410    420   
    #[::tokio::test]
  411    421   
    #[::tracing_test::traced_test]
  412    422   
    async fn xml_timestamps_with_http_date_format_request() {
  413    423   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  414    424   
        let config_builder = crate::config::Config::builder()
  415    425   
            .with_test_defaults()
  416         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         426  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         427  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         428  +
            .allow_no_auth()
  417    429   
            .endpoint_url("https://example.com");
  418    430   
  419    431   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  420    432   
        let result = client
  421    433   
            .xml_timestamps()
  422    434   
            .set_http_date(::std::option::Option::Some(::aws_smithy_types::DateTime::from_fractional_secs(
  423    435   
                1398796238, 0_f64,
  424    436   
            )))
  425    437   
            .send()
  426    438   
            .await;
  427    439   
        let _ = dbg!(result);
  428    440   
        let http_request = request_receiver.expect_request();
  429    441   
        let expected_headers = [("Content-Type", "application/xml")];
  430    442   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  431    443   
        let body = http_request.body().bytes().expect("body should be strict");
  432    444   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
  433    445   
            body,
  434    446   
            "<XmlTimestampsRequest>\n    <httpDate>Tue, 29 Apr 2014 18:30:38 GMT</httpDate>\n</XmlTimestampsRequest>\n",
  435    447   
            ::aws_smithy_protocol_test::MediaType::from("application/xml"),
  436    448   
        ));
  437    449   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  438    450   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  439    451   
        ::pretty_assertions::assert_eq!(uri.path(), "/XmlTimestamps", "path was incorrect");
  440    452   
    }
  441    453   
  442    454   
    /// Ensures that the timestampFormat of http-date on the target shape works
  443    455   
    /// Test ID: XmlTimestampsWithHttpDateOnTargetFormat
  444    456   
    #[::tokio::test]
  445    457   
    #[::tracing_test::traced_test]
  446    458   
    async fn xml_timestamps_with_http_date_on_target_format_request() {
  447    459   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  448    460   
        let config_builder = crate::config::Config::builder()
  449    461   
            .with_test_defaults()
  450         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         462  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         463  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         464  +
            .allow_no_auth()
  451    465   
            .endpoint_url("https://example.com");
  452    466   
  453    467   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  454    468   
        let result = client
  455    469   
            .xml_timestamps()
  456    470   
            .set_http_date_on_target(::std::option::Option::Some(::aws_smithy_types::DateTime::from_fractional_secs(
  457    471   
                1398796238, 0_f64,
  458    472   
            )))
  459    473   
            .send()
  460    474   
            .await;

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

@@ -214,214 +381,389 @@
  234    234   
mod xml_unions_test {
  235    235   
  236    236   
    /// Serializes union struct member
  237    237   
    /// Test ID: XmlUnionsWithStructMember
  238    238   
    #[::tokio::test]
  239    239   
    #[::tracing_test::traced_test]
  240    240   
    async fn xml_unions_with_struct_member_request() {
  241    241   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  242    242   
        let config_builder = crate::config::Config::builder()
  243    243   
            .with_test_defaults()
  244         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         244  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         245  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         246  +
            .allow_no_auth()
  245    247   
            .endpoint_url("https://example.com");
  246    248   
  247    249   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  248    250   
        let result = client
  249    251   
            .xml_unions()
  250    252   
            .set_union_value(::std::option::Option::Some(crate::types::XmlUnionShape::StructValue(
  251    253   
                crate::types::XmlNestedUnionStruct::builder()
  252    254   
                    .set_string_value(::std::option::Option::Some("string".to_owned()))
  253    255   
                    .set_boolean_value(::std::option::Option::Some(true))
  254    256   
                    .set_byte_value(::std::option::Option::Some(1))
  255    257   
                    .set_short_value(::std::option::Option::Some(2))
  256    258   
                    .set_integer_value(::std::option::Option::Some(3))
  257    259   
                    .set_long_value(::std::option::Option::Some(4))
  258    260   
                    .set_float_value(::std::option::Option::Some(5.5_f32))
  259    261   
                    .set_double_value(::std::option::Option::Some(6.5_f64))
  260    262   
                    .build(),
  261    263   
            )))
  262    264   
            .send()
  263    265   
            .await;
  264    266   
        let _ = dbg!(result);
  265    267   
        let http_request = request_receiver.expect_request();
  266    268   
        let expected_headers = [("Content-Type", "application/xml")];
  267    269   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  268    270   
        let body = http_request.body().bytes().expect("body should be strict");
  269    271   
        ::aws_smithy_protocol_test::assert_ok(
  270    272   
        ::aws_smithy_protocol_test::validate_body(body, "<XmlUnionsRequest>\n    <unionValue>\n       <structValue>\n          <stringValue>string</stringValue>\n          <booleanValue>true</booleanValue>\n          <byteValue>1</byteValue>\n          <shortValue>2</shortValue>\n          <integerValue>3</integerValue>\n          <longValue>4</longValue>\n          <floatValue>5.5</floatValue>\n          <doubleValue>6.5</doubleValue>\n       </structValue>\n    </unionValue>\n</XmlUnionsRequest>\n", ::aws_smithy_protocol_test::MediaType::from("application/xml"))
  271    273   
        );
  272    274   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  273    275   
        ::pretty_assertions::assert_eq!(http_request.method(), "PUT", "method was incorrect");
  274    276   
        ::pretty_assertions::assert_eq!(uri.path(), "/XmlUnions", "path was incorrect");
  275    277   
    }
  276    278   
  277    279   
    /// serialize union string member
  278    280   
    /// Test ID: XmlUnionsWithStringMember
  279    281   
    #[::tokio::test]
  280    282   
    #[::tracing_test::traced_test]
  281    283   
    async fn xml_unions_with_string_member_request() {
  282    284   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  283    285   
        let config_builder = crate::config::Config::builder()
  284    286   
            .with_test_defaults()
  285         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         287  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         288  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         289  +
            .allow_no_auth()
  286    290   
            .endpoint_url("https://example.com");
  287    291   
  288    292   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  289    293   
        let result = client
  290    294   
            .xml_unions()
  291    295   
            .set_union_value(::std::option::Option::Some(crate::types::XmlUnionShape::StringValue(
  292    296   
                "some string".to_owned(),
  293    297   
            )))
  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 = [("Content-Type", "application/xml")];
  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   
            "<XmlUnionsRequest>\n   <unionValue>\n      <stringValue>some string</stringValue>\n   </unionValue>\n</XmlUnionsRequest>\n",
  304    308   
            ::aws_smithy_protocol_test::MediaType::from("application/xml"),
  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(), "PUT", "method was incorrect");
  308    312   
        ::pretty_assertions::assert_eq!(uri.path(), "/XmlUnions", "path was incorrect");
  309    313   
    }
  310    314   
  311    315   
    /// Serializes union boolean member
  312    316   
    /// Test ID: XmlUnionsWithBooleanMember
  313    317   
    #[::tokio::test]
  314    318   
    #[::tracing_test::traced_test]
  315    319   
    async fn xml_unions_with_boolean_member_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   
            .xml_unions()
  325    331   
            .set_union_value(::std::option::Option::Some(crate::types::XmlUnionShape::BooleanValue(true)))
  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 = [("Content-Type", "application/xml")];
  331    337   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  332    338   
        let body = http_request.body().bytes().expect("body should be strict");
  333    339   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
  334    340   
            body,
  335    341   
            "<XmlUnionsRequest>\n   <unionValue>\n      <booleanValue>true</booleanValue>\n   </unionValue>\n</XmlUnionsRequest>\n",
  336    342   
            ::aws_smithy_protocol_test::MediaType::from("application/xml"),
  337    343   
        ));
  338    344   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  339    345   
        ::pretty_assertions::assert_eq!(http_request.method(), "PUT", "method was incorrect");
  340    346   
        ::pretty_assertions::assert_eq!(uri.path(), "/XmlUnions", "path was incorrect");
  341    347   
    }
  342    348   
  343    349   
    /// Serializes union member
  344    350   
    /// Test ID: XmlUnionsWithUnionMember
  345    351   
    #[::tokio::test]
  346    352   
    #[::tracing_test::traced_test]
  347    353   
    async fn xml_unions_with_union_member_request() {
  348    354   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  349    355   
        let config_builder = crate::config::Config::builder()
  350    356   
            .with_test_defaults()
  351         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         357  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         358  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         359  +
            .allow_no_auth()
  352    360   
            .endpoint_url("https://example.com");
  353    361   
  354    362   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  355    363   
        let result = client
  356    364   
            .xml_unions()
  357    365   
            .set_union_value(::std::option::Option::Some(crate::types::XmlUnionShape::UnionValue(
  358    366   
                ::std::boxed::Box::new(crate::types::XmlUnionShape::BooleanValue(true)),
  359    367   
            )))
  360    368   
            .send()
  361    369   
            .await;

tmp-codegen-diff/codegen-client-test/rest_xml_extras/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   
    ///
@@ -1198,1214 +1258,1275 @@
 1218   1234   
    {
 1219   1235   
        if config.behavior_version.is_none() {
 1220   1236   
            config.behavior_version = Some(::aws_smithy_runtime_api::client::behavior_version::BehaviorVersion::latest());
 1221   1237   
        }
 1222   1238   
    }
 1223   1239   
 1224   1240   
    let default_retry_partition = "restxmlprotocol";
 1225   1241   
 1226   1242   
    let scope = "rest_xml_extras";
 1227   1243   
 1228         -
    let mut plugins = ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins::new()
        1244  +
    #[allow(deprecated)]
        1245  +
                    let mut plugins = ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins::new()
 1229   1246   
                        // defaults
 1230   1247   
                        .with_client_plugins(::aws_smithy_runtime::client::defaults::default_plugins(
 1231   1248   
                            ::aws_smithy_runtime::client::defaults::DefaultPluginParams::new()
 1232   1249   
                                .with_retry_partition_name(default_retry_partition)
 1233   1250   
                                .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."))
 1234   1251   
                        ))
 1235   1252   
                        // user config
 1236   1253   
                        .with_client_plugin(
 1237   1254   
                            ::aws_smithy_runtime_api::client::runtime_plugin::StaticRuntimePlugin::new()
 1238   1255   
                                .with_config(config.config.clone())

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

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

tmp-codegen-diff/codegen-client-test/rest_xml_extras/rust-client-codegen/src/operation/checksum_required.rs

@@ -221,221 +281,283 @@
  241    241   
#[cfg(test)]
  242    242   
mod checksum_required_test {
  243    243   
  244    244   
    /// Test ID: ChecksumRequiredHeader
  245    245   
    #[::tokio::test]
  246    246   
    #[::tracing_test::traced_test]
  247    247   
    async fn checksum_required_header_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   
            .checksum_required()
  257    259   
            .set_field(::std::option::Option::Some("hello".to_owned()))
  258    260   
            .send()
  259    261   
            .await;
  260    262   
        let _ = dbg!(result);
  261    263   
        let http_request = request_receiver.expect_request();