Unverified Commit f003000d authored by Landon James's avatar Landon James Committed by GitHub
Browse files

Update docs for non aws-config config builders (#3960)

## Motivation and Context
<!--- Why is this change required? What problem does it solve? -->
<!--- If it fixes an open issue, please link to the issue here -->
Partially addresses https://github.com/awslabs/aws-sdk-rust/issues/1226,
although we might want to look into going further and actually
deprecating or warning on these builder methods.

## Description
<!--- Describe your changes in detail -->

## Testing
<!--- Please describe in detail how you tested your changes -->
<!--- Include details of your testing environment, and the tests you ran
to -->
<!--- see how your change affects other areas of the code, etc. -->
Doc only update

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
parent 845bb910
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -399,6 +399,13 @@ class ServiceConfigGenerator(
        }

    fun render(writer: RustWriter) {
        val configDocs = """
            Constructs a config builder.
            <div class="warning">
            Note that a config created from this builder will not have the same safe defaults as one created by
            the <a href="https://crates.io/crates/aws-config" target="_blank">aws-config</a> crate.
            </div>
        """
        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)