diff --git a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/config/ServiceConfigGenerator.kt b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/config/ServiceConfigGenerator.kt
index bca2f15c6e..a796b65da6 100644
--- a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/config/ServiceConfigGenerator.kt
+++ b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/config/ServiceConfigGenerator.kt
@@ -399,6 +399,13 @@ class ServiceConfigGenerator(
}
fun render(writer: RustWriter) {
+ val configDocs = """
+ Constructs a config builder.
+
+ Note that a config created from this builder will not have the same safe defaults as one created by
+ the
aws-config crate.
+
+ """
writer.docs("Configuration for a $moduleUseName service client.\n")
customizations.forEach {
it.section(ServiceConfig.ConfigStructAdditionalDocs)(writer)
@@ -424,9 +431,9 @@ class ServiceConfigGenerator(
}
writer.rustBlock("impl Config") {
+ writer.docs(configDocs)
writer.rustTemplate(
"""
- /// Constructs a config builder.
pub fn builder() -> Builder { Builder::default() }
""",
)
@@ -483,7 +490,7 @@ class ServiceConfigGenerator(
}
writer.rustBlock("impl Builder") {
- writer.docs("Constructs a config builder.")
+ writer.docs(configDocs)
writer.rust("pub fn new() -> Self { Self::default() }")
builderFromConfigBag()(this)