Skip to content

Commit

Permalink
Merge pull request #5313 from aws/fix-sensitivelistmap
Browse files Browse the repository at this point in the history
fix sensitive missing on list/map
  • Loading branch information
lucix-aws authored Jul 22, 2024
2 parents e8ff775 + 4e433e1 commit e65d388
Show file tree
Hide file tree
Showing 47 changed files with 214 additions and 197 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG_PENDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@
### SDK Enhancements

### SDK Bugs
* Apply sensitive struct tag to lists/maps with sensitive members.
* This change propagates existing sensitive protection to lists/maps.
17 changes: 16 additions & 1 deletion private/model/api/shape.go
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,7 @@ func (ref *ShapeRef) GoTags(toplevel bool, isRequired bool) string {
tags = append(tags, ShapeTag{"ignore", "true"})
}

if ref.Shape.Sensitive {
if ref.Shape.IsSensitive() {
tags = append(tags, ShapeTag{"sensitive", "true"})
}

Expand All @@ -619,6 +619,21 @@ func (s *Shape) HasPayloadMembers() bool {
return false
}

// IsSensitive checks whether the Shape itself is sensitive, or if the Shape is
// a collection/map with a sensitive member.
func (s *Shape) IsSensitive() bool {
if s.Sensitive {
return true
}
if s.MemberRef.Shape != nil && s.MemberRef.Shape.Sensitive {
return true
}
if s.ValueRef.Shape != nil && s.ValueRef.Shape.Sensitive {
return true
}
return false
}

// Docstring returns the godocs formated documentation
func (ref *ShapeRef) Docstring() string {
if ref.Documentation != "" {
Expand Down
2 changes: 1 addition & 1 deletion service/appflow/api.go

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

2 changes: 1 addition & 1 deletion service/applicationdiscoveryservice/api.go

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

8 changes: 4 additions & 4 deletions service/apprunner/api.go

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

8 changes: 4 additions & 4 deletions service/auditmanager/api.go

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

10 changes: 5 additions & 5 deletions service/bedrock/api.go

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

2 changes: 1 addition & 1 deletion service/bedrockagent/api.go

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

10 changes: 5 additions & 5 deletions service/bedrockagentruntime/api.go

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

2 changes: 1 addition & 1 deletion service/billingconductor/api.go

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

32 changes: 16 additions & 16 deletions service/chime/api.go

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

2 changes: 1 addition & 1 deletion service/chimesdkidentity/api.go

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

2 changes: 1 addition & 1 deletion service/chimesdkmediapipelines/api.go

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

4 changes: 2 additions & 2 deletions service/chimesdkmessaging/api.go

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

Loading

0 comments on commit e65d388

Please sign in to comment.