Client Test

Client Test

rev. 26e0a1e8aaec58e3c7fd18a79449d71bcadaf391

Files changed:

tmp-codegen-diff/codegen-client-test/naming_test_casing/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 = "acronyminside_service";
 1225   1241   
 1226   1242   
    let scope = "naming_test_casing";
 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/naming_test_ops/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 = "config";
 1225   1241   
 1226   1242   
    let scope = "naming_test_ops";
 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/naming_test_ops/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/naming_test_ops/rust-client-codegen/src/operation/reserved_words_as_members.rs

@@ -222,222 +282,284 @@
  242    242   
#[cfg(test)]
  243    243   
mod reserved_words_as_members_test {
  244    244   
  245    245   
    /// Test ID: reserved_words
  246    246   
    #[::tokio::test]
  247    247   
    #[::tracing_test::traced_test]
  248    248   
    async fn reserved_words_request() {
  249    249   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  250    250   
        let config_builder = crate::config::Config::builder()
  251    251   
            .with_test_defaults()
  252         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         252  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         253  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         254  +
            .allow_no_auth()
  253    255   
            .endpoint_url("https://example.com");
  254    256   
  255    257   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  256    258   
        let result = client
  257    259   
            .reserved_words_as_members()
  258    260   
            .set_as(::std::option::Option::Some(5))
  259    261   
            .set_async(::std::option::Option::Some(true))
  260    262   
            .send()
  261    263   
            .await;
  262    264   
        let _ = dbg!(result);

tmp-codegen-diff/codegen-client-test/naming_test_ops/rust-client-codegen/src/operation/structure_name_punning.rs

@@ -222,222 +282,284 @@
  242    242   
#[cfg(test)]
  243    243   
mod structure_name_punning_test {
  244    244   
  245    245   
    /// Test ID: structure_punning
  246    246   
    #[::tokio::test]
  247    247   
    #[::tracing_test::traced_test]
  248    248   
    async fn structure_punning_request() {
  249    249   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  250    250   
        let config_builder = crate::config::Config::builder()
  251    251   
            .with_test_defaults()
  252         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         252  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         253  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         254  +
            .allow_no_auth()
  253    255   
            .endpoint_url("https://example.com");
  254    256   
  255    257   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  256    258   
        let result = client
  257    259   
            .structure_name_punning()
  258    260   
            .set_regular_string(::std::option::Option::Some("hello!".to_owned()))
  259    261   
            .send()
  260    262   
            .await;
  261    263   
        let _ = dbg!(result);
  262    264   
        let http_request = request_receiver.expect_request();

tmp-codegen-diff/codegen-client-test/naming_test_structs/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 = "namingobstaclecoursestructs";
 1225   1241   
 1226   1242   
    let scope = "naming_test_structs";
 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/pokemon-service-awsjson-client/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 = "pokemonservice";
 1225   1241   
 1226   1242   
    let scope = "pokemon-service-awsjson-client";
 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/pokemon-service-client/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 = "pokemonservice";
 1225   1241   
 1226   1242   
    let scope = "pokemon-service-client";
 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/query-compat-test/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 = "querycompatservice";
 1225   1241   
 1226   1242   
    let scope = "query-compat-test";
 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/query-compat-test/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/query-compat-test/rust-client-codegen/src/operation/operation.rs

@@ -217,217 +277,279 @@
  237    237   
#[cfg(test)]
  238    238   
mod operation_test {
  239    239   
  240    240   
    /// Test ID: BasicQueryCompatTest
  241    241   
    #[::tokio::test]
  242    242   
    #[::tracing_test::traced_test]
  243    243   
    async fn basic_query_compat_test_request() {
  244    244   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  245    245   
        let config_builder = crate::config::Config::builder()
  246    246   
            .with_test_defaults()
  247         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         247  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         248  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         249  +
            .allow_no_auth()
  248    250   
            .endpoint_url("https://example.com");
  249    251   
  250    252   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  251    253   
        let result = client
  252    254   
            .operation()
  253    255   
            .set_message(::std::option::Option::Some("hello!".to_owned()))
  254    256   
            .send()
  255    257   
            .await;
  256    258   
        let _ = dbg!(result);
  257    259   
        let http_request = request_receiver.expect_request();

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

@@ -366,366 +425,441 @@
  386    386   
  387    387   
    /// Set the auth scheme resolver for the builder
  388    388   
    ///
  389    389   
    /// # Examples
  390    390   
    /// See an example for [`Self::auth_scheme_resolver`].
  391    391   
    pub fn set_auth_scheme_resolver(&mut self, auth_scheme_resolver: impl crate::config::auth::ResolveAuthScheme + 'static) -> &mut Self {
  392    392   
        self.runtime_components
  393    393   
            .set_auth_scheme_option_resolver(::std::option::Option::Some(auth_scheme_resolver.into_shared_resolver()));
  394    394   
        self
  395    395   
    }
         396  +
         397  +
    /// Add [NoAuthScheme](aws_smithy_runtime::client::auth::no_auth::NoAuthScheme) as a fallback for operations that don't require authentication
         398  +
    ///
         399  +
    /// The auth scheme resolver will use this when no other auth schemes are applicable.
         400  +
    pub fn allow_no_auth(mut self) -> Self {
         401  +
        self.set_allow_no_auth();
         402  +
        self
         403  +
    }
         404  +
         405  +
    /// Add [NoAuthScheme](aws_smithy_runtime::client::auth::no_auth::NoAuthScheme) as a fallback for operations that don't require authentication
         406  +
    ///
         407  +
    /// The auth scheme resolver will use this when no other auth schemes are applicable.
         408  +
    pub fn set_allow_no_auth(&mut self) -> &mut Self {
         409  +
        self.push_runtime_plugin(::aws_smithy_runtime::client::auth::no_auth::NoAuthRuntimePluginV2::new().into_shared());
         410  +
        self
         411  +
    }
  396    412   
    /// Set the auth scheme preference for an auth scheme resolver
  397    413   
    /// (typically the default auth scheme resolver).
  398    414   
    ///
  399    415   
    /// Each operation has a predefined order of auth schemes, as determined by the service,
  400    416   
    /// for auth scheme resolution. By using the auth scheme preference, customers
  401    417   
    /// can reorder the schemes resolved by the auth scheme resolver.
  402    418   
    ///
  403    419   
    /// The preference list is intended as a hint rather than a strict override.
  404    420   
    /// Any schemes not present in the originally resolved auth schemes will be ignored.
  405    421   
    ///
@@ -1214,1230 +1274,1291 @@
 1234   1250   
    {
 1235   1251   
        if config.behavior_version.is_none() {
 1236   1252   
            config.behavior_version = Some(::aws_smithy_runtime_api::client::behavior_version::BehaviorVersion::latest());
 1237   1253   
        }
 1238   1254   
    }
 1239   1255   
 1240   1256   
    let default_retry_partition = "restjsonprotocol";
 1241   1257   
 1242   1258   
    let scope = "rest_json";
 1243   1259   
 1244         -
    let mut plugins = ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins::new()
        1260  +
    #[allow(deprecated)]
        1261  +
                    let mut plugins = ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins::new()
 1245   1262   
                        // defaults
 1246   1263   
                        .with_client_plugins(::aws_smithy_runtime::client::defaults::default_plugins(
 1247   1264   
                            ::aws_smithy_runtime::client::defaults::DefaultPluginParams::new()
 1248   1265   
                                .with_retry_partition_name(default_retry_partition)
 1249   1266   
                                .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."))
 1250   1267   
                        ))
 1251   1268   
                        // user config
 1252   1269   
                        .with_client_plugin(
 1253   1270   
                            ::aws_smithy_runtime_api::client::runtime_plugin::StaticRuntimePlugin::new()
 1254   1271   
                                .with_config(config.config.clone())

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

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

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/all_query_string_types.rs

@@ -383,383 +443,445 @@
  403    403   
mod all_query_string_types_test {
  404    404   
  405    405   
    /// Serializes query string parameters with all supported types
  406    406   
    /// Test ID: RestJsonAllQueryStringTypes
  407    407   
    #[::tokio::test]
  408    408   
    #[::tracing_test::traced_test]
  409    409   
    async fn rest_json_all_query_string_types_request() {
  410    410   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  411    411   
        let config_builder = crate::config::Config::builder()
  412    412   
            .with_test_defaults()
  413         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         413  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         414  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         415  +
            .allow_no_auth()
  414    416   
            .endpoint_url("https://example.com");
  415    417   
  416    418   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  417    419   
        let result = client
  418    420   
            .all_query_string_types()
  419    421   
            .set_query_string(::std::option::Option::Some("Hello there".to_owned()))
  420    422   
            .set_query_string_list(::std::option::Option::Some(vec!["a".to_owned(), "b".to_owned(), "c".to_owned()]))
  421    423   
            .set_query_string_set(::std::option::Option::Some(vec!["a".to_owned(), "b".to_owned(), "c".to_owned()]))
  422    424   
            .set_query_byte(::std::option::Option::Some(1))
  423    425   
            .set_query_short(::std::option::Option::Some(2))
@@ -511,513 +759,773 @@
  531    533   
    }
  532    534   
  533    535   
    /// Handles query string maps
  534    536   
    /// Test ID: RestJsonQueryStringMap
  535    537   
    #[::tokio::test]
  536    538   
    #[::tracing_test::traced_test]
  537    539   
    async fn rest_json_query_string_map_request() {
  538    540   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  539    541   
        let config_builder = crate::config::Config::builder()
  540    542   
            .with_test_defaults()
  541         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         543  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         544  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         545  +
            .allow_no_auth()
  542    546   
            .endpoint_url("https://example.com");
  543    547   
  544    548   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  545    549   
        let result = client
  546    550   
            .all_query_string_types()
  547    551   
            .set_query_params_map_of_string_list(::std::option::Option::Some({
  548    552   
                let mut ret = ::std::collections::HashMap::new();
  549    553   
                ret.insert("QueryParamsStringKeyA".to_owned(), vec!["Foo".to_owned()]);
  550    554   
                ret.insert("QueryParamsStringKeyB".to_owned(), vec!["Bar".to_owned()]);
  551    555   
                ret
  552    556   
            }))
  553    557   
            .send()
  554    558   
            .await;
  555    559   
        let _ = dbg!(result);
  556    560   
        let http_request = request_receiver.expect_request();
  557    561   
        let expected_query_params = &["QueryParamsStringKeyA=Foo", "QueryParamsStringKeyB=Bar"];
  558    562   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_query_string(&http_request, expected_query_params));
  559    563   
        let body = http_request.body().bytes().expect("body should be strict");
  560    564   
        // No body.
  561    565   
        ::pretty_assertions::assert_eq!(&body, &::bytes::Bytes::new());
  562    566   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  563    567   
        ::pretty_assertions::assert_eq!(http_request.method(), "GET", "method was incorrect");
  564    568   
        ::pretty_assertions::assert_eq!(uri.path(), "/AllQueryStringTypesInput", "path was incorrect");
  565    569   
    }
  566    570   
  567    571   
    /// Handles escaping all required characters in the query string.
  568    572   
    /// Test ID: RestJsonQueryStringEscaping
  569    573   
    #[::tokio::test]
  570    574   
    #[::tracing_test::traced_test]
  571    575   
    async fn rest_json_query_string_escaping_request() {
  572    576   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  573    577   
        let config_builder = crate::config::Config::builder()
  574    578   
            .with_test_defaults()
  575         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         579  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         580  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         581  +
            .allow_no_auth()
  576    582   
            .endpoint_url("https://example.com");
  577    583   
  578    584   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  579    585   
        let result = client
  580    586   
            .all_query_string_types()
  581    587   
            .set_query_string(::std::option::Option::Some(" %:/?#[]@!$&'()*+,;=😹".to_owned()))
  582    588   
            .set_query_params_map_of_string_list(::std::option::Option::Some({
  583    589   
                let mut ret = ::std::collections::HashMap::new();
  584    590   
                ret.insert("String".to_owned(), vec![" %:/?#[]@!$&'()*+,;=😹".to_owned()]);
  585    591   
                ret
  586    592   
            }))
  587    593   
            .send()
  588    594   
            .await;
  589    595   
        let _ = dbg!(result);
  590    596   
        let http_request = request_receiver.expect_request();
  591    597   
        let expected_query_params = &["String=%20%25%3A%2F%3F%23%5B%5D%40%21%24%26%27%28%29%2A%2B%2C%3B%3D%F0%9F%98%B9"];
  592    598   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_query_string(&http_request, expected_query_params));
  593    599   
        let body = http_request.body().bytes().expect("body should be strict");
  594    600   
        // No body.
  595    601   
        ::pretty_assertions::assert_eq!(&body, &::bytes::Bytes::new());
  596    602   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  597    603   
        ::pretty_assertions::assert_eq!(http_request.method(), "GET", "method was incorrect");
  598    604   
        ::pretty_assertions::assert_eq!(uri.path(), "/AllQueryStringTypesInput", "path was incorrect");
  599    605   
    }
  600    606   
  601    607   
    /// Supports handling NaN float query values.
  602    608   
    /// Test ID: RestJsonSupportsNaNFloatQueryValues
  603    609   
    #[::tokio::test]
  604    610   
    #[::tracing_test::traced_test]
  605    611   
    async fn rest_json_supports_na_n_float_query_values_request() {
  606    612   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  607    613   
        let config_builder = crate::config::Config::builder()
  608    614   
            .with_test_defaults()
  609         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         615  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         616  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         617  +
            .allow_no_auth()
  610    618   
            .endpoint_url("https://example.com");
  611    619   
  612    620   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  613    621   
        let result = client
  614    622   
            .all_query_string_types()
  615    623   
            .set_query_float(::std::option::Option::Some(
  616    624   
                <f32 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive("NaN").expect("invalid string for number"),
  617    625   
            ))
  618    626   
            .set_query_double(::std::option::Option::Some(
  619    627   
                <f64 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive("NaN").expect("invalid string for number"),
  620    628   
            ))
  621    629   
            .set_query_params_map_of_string_list(::std::option::Option::Some({
  622    630   
                let mut ret = ::std::collections::HashMap::new();
  623    631   
                ret.insert("Float".to_owned(), vec!["NaN".to_owned()]);
  624    632   
                ret.insert("Double".to_owned(), vec!["NaN".to_owned()]);
  625    633   
                ret
  626    634   
            }))
  627    635   
            .send()
  628    636   
            .await;
  629    637   
        let _ = dbg!(result);
  630    638   
        let http_request = request_receiver.expect_request();
  631    639   
        let expected_query_params = &["Float=NaN", "Double=NaN"];
  632    640   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_query_string(&http_request, expected_query_params));
  633    641   
        let body = http_request.body().bytes().expect("body should be strict");
  634    642   
        // No body.
  635    643   
        ::pretty_assertions::assert_eq!(&body, &::bytes::Bytes::new());
  636    644   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  637    645   
        ::pretty_assertions::assert_eq!(http_request.method(), "GET", "method was incorrect");
  638    646   
        ::pretty_assertions::assert_eq!(uri.path(), "/AllQueryStringTypesInput", "path was incorrect");
  639    647   
    }
  640    648   
  641    649   
    /// Supports handling Infinity float query values.
  642    650   
    /// Test ID: RestJsonSupportsInfinityFloatQueryValues
  643    651   
    #[::tokio::test]
  644    652   
    #[::tracing_test::traced_test]
  645    653   
    async fn rest_json_supports_infinity_float_query_values_request() {
  646    654   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  647    655   
        let config_builder = crate::config::Config::builder()
  648    656   
            .with_test_defaults()
  649         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         657  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         658  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         659  +
            .allow_no_auth()
  650    660   
            .endpoint_url("https://example.com");
  651    661   
  652    662   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  653    663   
        let result = client
  654    664   
            .all_query_string_types()
  655    665   
            .set_query_float(::std::option::Option::Some(
  656    666   
                <f32 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive("Infinity").expect("invalid string for number"),
  657    667   
            ))
  658    668   
            .set_query_double(::std::option::Option::Some(
  659    669   
                <f64 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive("Infinity").expect("invalid string for number"),
  660    670   
            ))
  661    671   
            .set_query_params_map_of_string_list(::std::option::Option::Some({
  662    672   
                let mut ret = ::std::collections::HashMap::new();
  663    673   
                ret.insert("Float".to_owned(), vec!["Infinity".to_owned()]);
  664    674   
                ret.insert("Double".to_owned(), vec!["Infinity".to_owned()]);
  665    675   
                ret
  666    676   
            }))
  667    677   
            .send()
  668    678   
            .await;
  669    679   
        let _ = dbg!(result);
  670    680   
        let http_request = request_receiver.expect_request();
  671    681   
        let expected_query_params = &["Float=Infinity", "Double=Infinity"];
  672    682   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_query_string(&http_request, expected_query_params));
  673    683   
        let body = http_request.body().bytes().expect("body should be strict");
  674    684   
        // No body.
  675    685   
        ::pretty_assertions::assert_eq!(&body, &::bytes::Bytes::new());
  676    686   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  677    687   
        ::pretty_assertions::assert_eq!(http_request.method(), "GET", "method was incorrect");
  678    688   
        ::pretty_assertions::assert_eq!(uri.path(), "/AllQueryStringTypesInput", "path was incorrect");
  679    689   
    }
  680    690   
  681    691   
    /// Supports handling -Infinity float query values.
  682    692   
    /// Test ID: RestJsonSupportsNegativeInfinityFloatQueryValues
  683    693   
    #[::tokio::test]
  684    694   
    #[::tracing_test::traced_test]
  685    695   
    async fn rest_json_supports_negative_infinity_float_query_values_request() {
  686    696   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  687    697   
        let config_builder = crate::config::Config::builder()
  688    698   
            .with_test_defaults()
  689         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         699  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         700  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         701  +
            .allow_no_auth()
  690    702   
            .endpoint_url("https://example.com");
  691    703   
  692    704   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  693    705   
        let result = client
  694    706   
            .all_query_string_types()
  695    707   
            .set_query_float(::std::option::Option::Some(
  696    708   
                <f32 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive("-Infinity").expect("invalid string for number"),
  697    709   
            ))
  698    710   
            .set_query_double(::std::option::Option::Some(
  699    711   
                <f64 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive("-Infinity").expect("invalid string for number"),
  700    712   
            ))
  701    713   
            .set_query_params_map_of_string_list(::std::option::Option::Some({
  702    714   
                let mut ret = ::std::collections::HashMap::new();
  703    715   
                ret.insert("Float".to_owned(), vec!["-Infinity".to_owned()]);
  704    716   
                ret.insert("Double".to_owned(), vec!["-Infinity".to_owned()]);
  705    717   
                ret
  706    718   
            }))
  707    719   
            .send()
  708    720   
            .await;
  709    721   
        let _ = dbg!(result);
  710    722   
        let http_request = request_receiver.expect_request();
  711    723   
        let expected_query_params = &["Float=-Infinity", "Double=-Infinity"];
  712    724   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_query_string(&http_request, expected_query_params));
  713    725   
        let body = http_request.body().bytes().expect("body should be strict");
  714    726   
        // No body.
  715    727   
        ::pretty_assertions::assert_eq!(&body, &::bytes::Bytes::new());
  716    728   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  717    729   
        ::pretty_assertions::assert_eq!(http_request.method(), "GET", "method was incorrect");
  718    730   
        ::pretty_assertions::assert_eq!(uri.path(), "/AllQueryStringTypesInput", "path was incorrect");
  719    731   
    }
  720    732   
  721    733   
    /// Query values of 0 and false are serialized
  722    734   
    /// Test ID: RestJsonZeroAndFalseQueryValues
  723    735   
    #[::tokio::test]
  724    736   
    #[::tracing_test::traced_test]
  725    737   
    async fn rest_json_zero_and_false_query_values_request() {
  726    738   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  727    739   
        let config_builder = crate::config::Config::builder()
  728    740   
            .with_test_defaults()
  729         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         741  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         742  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         743  +
            .allow_no_auth()
  730    744   
            .endpoint_url("https://example.com");
  731    745   
  732    746   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  733    747   
        let result = client
  734    748   
            .all_query_string_types()
  735    749   
            .set_query_integer(::std::option::Option::Some(0))
  736    750   
            .set_query_boolean(::std::option::Option::Some(false))
  737    751   
            .set_query_params_map_of_string_list(::std::option::Option::Some({
  738    752   
                let mut ret = ::std::collections::HashMap::new();
  739    753   
                ret.insert("Integer".to_owned(), vec!["0".to_owned()]);

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/constant_and_variable_query_string.rs

@@ -239,239 +330,334 @@
  259    259   
mod constant_and_variable_query_string_test {
  260    260   
  261    261   
    /// Mixes constant and variable query string parameters
  262    262   
    /// Test ID: RestJsonConstantAndVariableQueryStringMissingOneValue
  263    263   
    #[::tokio::test]
  264    264   
    #[::tracing_test::traced_test]
  265    265   
    async fn rest_json_constant_and_variable_query_string_missing_one_value_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
  274    276   
            .constant_and_variable_query_string()
  275    277   
            .set_baz(::std::option::Option::Some("bam".to_owned()))
  276    278   
            .send()
  277    279   
            .await;
  278    280   
        let _ = dbg!(result);
  279    281   
        let http_request = request_receiver.expect_request();
  280    282   
        let expected_query_params = &["foo=bar", "baz=bam"];
  281    283   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_query_string(&http_request, expected_query_params));
  282    284   
        let forbid_params = &["maybeSet"];
  283    285   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::forbid_query_params(&http_request, forbid_params));
  284    286   
        let body = http_request.body().bytes().expect("body should be strict");
  285    287   
        // No body.
  286    288   
        ::pretty_assertions::assert_eq!(&body, &::bytes::Bytes::new());
  287    289   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  288    290   
        ::pretty_assertions::assert_eq!(http_request.method(), "GET", "method was incorrect");
  289    291   
        ::pretty_assertions::assert_eq!(uri.path(), "/ConstantAndVariableQueryString", "path was incorrect");
  290    292   
    }
  291    293   
  292    294   
    /// Mixes constant and variable query string parameters
  293    295   
    /// Test ID: RestJsonConstantAndVariableQueryStringAllValues
  294    296   
    #[::tokio::test]
  295    297   
    #[::tracing_test::traced_test]
  296    298   
    async fn rest_json_constant_and_variable_query_string_all_values_request() {
  297    299   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  298    300   
        let config_builder = crate::config::Config::builder()
  299    301   
            .with_test_defaults()
  300         -
            .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
         302  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         303  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         304  +
            .allow_no_auth()
  301    305   
            .endpoint_url("https://example.com");
  302    306   
  303    307   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  304    308   
        let result = client
  305    309   
            .constant_and_variable_query_string()
  306    310   
            .set_baz(::std::option::Option::Some("bam".to_owned()))
  307    311   
            .set_maybe_set(::std::option::Option::Some("yes".to_owned()))
  308    312   
            .send()
  309    313   
            .await;
  310    314   
        let _ = dbg!(result);

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/constant_query_string.rs

@@ -239,239 +299,301 @@
  259    259   
mod constant_query_string_test {
  260    260   
  261    261   
    /// Includes constant query string parameters
  262    262   
    /// Test ID: RestJsonConstantQueryString
  263    263   
    #[::tokio::test]
  264    264   
    #[::tracing_test::traced_test]
  265    265   
    async fn rest_json_constant_query_string_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
  274    276   
            .constant_query_string()
  275    277   
            .set_hello(::std::option::Option::Some("hi".to_owned()))
  276    278   
            .send()
  277    279   
            .await;
  278    280   
        let _ = dbg!(result);
  279    281   
        let http_request = request_receiver.expect_request();