Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
429 changes: 429 additions & 0 deletions .changelog/b90b80a83c294a36a3b1e46effb51c9a.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion SMITHY_GO_CODEGEN_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
695755c8eb501de6899f71cd19e8249daff8f8b9
6f12c095f5277d7e682217bcfd50bab607b193ab
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I double checked this commit id matches on Smithy-Go aws/smithy-go@6f12c09

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea, the main branch commit after smithy go merge

Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ func bindAuthParamsRegion( _ interface{}, params $P, _ interface{}, options Opti
private GoWriter.Writable writeEndpointParamResolver() {
return goTemplate("""
func bindAuthEndpointParams(ctx $P, params $P, input interface{}, options Options) {
params.endpointParams = bindEndpointParams(ctx, input, options)
params.endpointParams, _ = bindEndpointParams(ctx, input, options)
}
""", GoStdlibTypes.Context.Context, AuthParametersGenerator.STRUCT_SYMBOL);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import software.amazon.smithy.codegen.core.SymbolProvider;
import software.amazon.smithy.go.codegen.GoDelegator;
import software.amazon.smithy.go.codegen.GoSettings;
import software.amazon.smithy.go.codegen.GoStdlibTypes;
import software.amazon.smithy.go.codegen.GoWriter;
import software.amazon.smithy.go.codegen.SmithyGoTypes;
import software.amazon.smithy.go.codegen.integration.GoIntegration;
Expand Down Expand Up @@ -93,12 +94,23 @@ func resolveAccountID(identity $auth:T, mode $accountIDEndpointMode:T) *string {

private GoWriter.Writable builtinBindingSource() {
return goTemplate("""
func bindRegion(region string) *string {
func bindRegion(region string) (*string, error) {
if region == "" {
return nil
return nil, nil
}
return $T($T(region))
if !$validHost:T(region) {
return nil, $error:T("invalid input region %s", region)
}
return $awsString:T($mapFipsRegion:T(region)), nil
}
""", SdkGoTypes.Aws.String, SdkGoTypes.Internal.Endpoints.MapFIPSRegion);
""",
MapUtils.of(
"awsString", SdkGoTypes.Aws.String,
"mapFipsRegion", SdkGoTypes.Internal.Endpoints.MapFIPSRegion,
"error", GoStdlibTypes.Fmt.Errorf,
"validHost", SmithyGoTypes.Transport.Http.ValidHostLabel
)
);
}
}
10 changes: 7 additions & 3 deletions internal/kitchensinktest/endpoints.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 7 additions & 3 deletions internal/protocoltest/awsrestjson/endpoints.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 7 additions & 3 deletions internal/protocoltest/ec2query/endpoints.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 7 additions & 3 deletions internal/protocoltest/jsonrpc/endpoints.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 7 additions & 3 deletions internal/protocoltest/jsonrpc10/endpoints.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 7 additions & 3 deletions internal/protocoltest/jsonrpc10querycompatible/endpoints.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 7 additions & 3 deletions internal/protocoltest/query/endpoints.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 7 additions & 3 deletions internal/protocoltest/querycompatiblejsonrpc10/endpoints.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 7 additions & 3 deletions internal/protocoltest/restxml/endpoints.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 7 additions & 3 deletions internal/protocoltest/restxmlwithnamespace/endpoints.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 7 additions & 3 deletions internal/protocoltest/smithyrpcv2cbor/endpoints.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 19 additions & 7 deletions service/accessanalyzer/endpoints.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading