Skip to content

Commit

Permalink
misc: add advanced endpoint config guide (#878)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucix-aws authored Mar 23, 2023
1 parent 0b3decb commit 7b160fc
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import software.amazon.smithy.kotlin.codegen.core.*
import software.amazon.smithy.kotlin.codegen.integration.KotlinIntegration
import software.amazon.smithy.kotlin.codegen.integration.SectionWriterBinding
import software.amazon.smithy.kotlin.codegen.lang.KotlinTypes
import software.amazon.smithy.kotlin.codegen.model.asNullable
import software.amazon.smithy.kotlin.codegen.model.boxed
import software.amazon.smithy.kotlin.codegen.rendering.*
import software.amazon.smithy.kotlin.codegen.rendering.util.ConfigProperty
Expand Down Expand Up @@ -76,9 +77,15 @@ class AwsServiceConfigIntegration : KotlinIntegration {

val EndpointUrlProp = ConfigProperty {
name = "endpointUrl"
symbol = RuntimeTypes.Core.Net.Url.toBuilder().boxed().build()
symbol = RuntimeTypes.Core.Net.Url.asNullable()
documentation = """
A custom endpoint to use when making requests.
A custom endpoint to route requests to. The endpoint set here is passed to the configured
[endpointProvider], which may inspect and modify it as needed.
Setting a custom endpointUrl should generally be preferred to overriding the [endpointProvider] and is
the recommended way to route requests to development or preview instances of a service.
**This is an advanced config option.**
""".trimIndent()
propertyType = ConfigPropertyType.SymbolDefault
}
Expand Down

0 comments on commit 7b160fc

Please sign in to comment.