Skip to content

Commit a73e0a1

Browse files
authored
Add primary identifiers for ReadMany operations (#116)
Related to #115 For some controllers we use `ReadMany` operations to read resource current state. For these operations we need to lookup for identifiers ending with `Names` and not `Name`. e.g `RepositoryNames` in `DescribeRepositories` operation. Description of changes: - Add primary identifiers for `ReadMany` operations By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent f239f5e commit a73e0a1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pkg/generate/code/set_resource.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -860,8 +860,11 @@ func SetResourceIdentifiers(
860860
if primaryIdentifier == "" {
861861
primaryIdentifierLookup := []string{
862862
"Name",
863+
"Names",
863864
r.Names.Original + "Name",
865+
r.Names.Original + "Names",
864866
r.Names.Original + "Id",
867+
r.Names.Original + "Ids",
865868
}
866869

867870
for _, memberName := range inputShape.MemberNames() {

0 commit comments

Comments
 (0)