Skip to content

Commit

Permalink
Fix: Kinesis Video SigningName (#4164)
Browse files Browse the repository at this point in the history
* kinesisvideo: Correct SigningName
* Regenerated Clients
  • Loading branch information
skmcgrail authored Jan 4, 2022
1 parent 29f6f92 commit de43cec
Show file tree
Hide file tree
Showing 128 changed files with 790 additions and 4 deletions.
24 changes: 20 additions & 4 deletions private/model/api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -561,12 +561,16 @@ func New(p client.ConfigProvider, cfgs ...*aws.Config) *{{ .StructName }} {
{{- else -}}
c := p.ClientConfig({{ EndpointsIDValue . }}, cfgs...)
{{- end }}
if c.SigningNameDerived || len(c.SigningName) == 0 {
{{- if .Metadata.SigningName }}
if c.SigningNameDerived || len(c.SigningName) == 0{
c.SigningName = "{{ .Metadata.SigningName }}"
}
c.SigningName = "{{ .Metadata.SigningName }}"
{{- else }}
{{- if not .NoConstServiceNames -}}
c.SigningName = {{ EndpointsIDValue . }}
// No Fallback
{{- end }}
{{- end }}
}
return newClient(*c.Config, c.Handlers, c.PartitionID, c.Endpoint, c.SigningRegion, c.SigningName, c.ResolvedRegion)
}
Expand Down Expand Up @@ -1039,6 +1043,18 @@ func (a *API) validateNoDocumentShapes() error {
return fmt.Errorf("model contains document shapes: %s", strings.Join(shapes, ", "))
}

func (a *API) backfillSigningName() {
backfill := map[string]string{
"kinesisvideo": "kinesisvideo",
}

if value, ok := backfill[a.PackageName()]; ok && len(a.Metadata.SigningName) == 0 {
a.Metadata.SigningName = value
} else if ok && len(a.Metadata.SigningName) > 0 {
debugLogger.Logf("%s no longer requires signingName backfill", a.PackageName())
}
}

func getDeprecatedMessage(msg string, name string) string {
if len(msg) == 0 {
return name + " has been deprecated"
Expand Down

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.

4 changes: 4 additions & 0 deletions private/model/api/codegentest/service/rpcservice/service.go

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

1 change: 1 addition & 0 deletions private/model/api/load.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ func (a *API) Setup() error {
a.writeShapeNames()
a.resolveReferences()
a.backfillErrorMembers()
a.backfillSigningName()

if !a.NoRemoveUnusedShapes {
a.removeUnusedShapes()
Expand Down
22 changes: 22 additions & 0 deletions private/protocol/ec2query/build_test.go

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

22 changes: 22 additions & 0 deletions private/protocol/ec2query/unmarshal_test.go

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

18 changes: 18 additions & 0 deletions private/protocol/jsonrpc/build_test.go

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

Loading

0 comments on commit de43cec

Please sign in to comment.