Skip to content

Commit c17470c

Browse files
authored
Add Swift imports to descriptions (#6787)
Adds import AWSfoo to each Swift record in the metadata for examples that currently exist. This causes the correct import for the function(s) being used to be included in context as a convenience to the reader.
1 parent c715069 commit c17470c

36 files changed

+311
-203
lines changed

.doc_gen/metadata/cognito-identity_metadata.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@ cognito-identity_ListIdentityPools:
77
github: swift/example_code/cognito-identity/FindOrCreateIdentityPool
88
sdkguide: sdk-for-swift/latest/developer-guide/getting-started.html
99
excerpts:
10-
- description: Find the ID of an identity pool given its name.
10+
- description:
1111
snippet_tags:
12+
- cognitoidentity.swift.import
1213
- cognitoidentity.swift.get-pool-id
1314
- description: Get the ID of an existing identity pool or create it if it doesn't already exist.
1415
snippet_tags:
16+
- cognitoidentity.swift.import
1517
- cognitoidentity.swift.get-or-create-pool-id
1618
Java:
1719
versions:
@@ -32,8 +34,9 @@ cognito-identity_CreateIdentityPool:
3234
github: swift/example_code/cognito-identity/FindOrCreateIdentityPool
3335
sdkguide: sdk-for-swift/latest/developer-guide/getting-started.html
3436
excerpts:
35-
- description: Create a new identity pool.
37+
- description:
3638
snippet_tags:
39+
- cognitoidentity.swift.import
3740
- cognitoidentity.swift.create-identity-pool
3841
Java:
3942
versions:
@@ -54,8 +57,9 @@ cognito-identity_DeleteIdentityPool:
5457
github: swift/example_code/cognito-identity/FindOrCreateIdentityPool
5558
sdkguide: sdk-for-swift/latest/developer-guide/getting-started.html
5659
excerpts:
57-
- description: Delete the specified identity pool.
60+
- description:
5861
snippet_tags:
62+
- cognitoidentity.swift.import
5963
- cognitoidentity.swift.delete-identity-pool
6064
Java:
6165
versions:

.doc_gen/metadata/dynamodb_metadata.yaml

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -173,10 +173,11 @@ dynamodb_CreateTable:
173173
Swift:
174174
versions:
175175
- sdk_version: 1
176-
github: swift/example_code/ddb
176+
github: swift/example_code/dynamodb
177177
excerpts:
178178
- description:
179179
snippet_tags:
180+
- ddb.swift.import
180181
- ddb.swift.basics.createtable
181182
Bash:
182183
versions:
@@ -255,10 +256,11 @@ dynamodb_BatchGetItem:
255256
Swift:
256257
versions:
257258
- sdk_version: 1
258-
github: swift/example_code/ddb
259+
github: swift/example_code/dynamodb
259260
excerpts:
260261
- description:
261262
snippet_tags:
263+
- ddb.swift.import
262264
- ddb.swift.batchgetitem.batchget
263265
Bash:
264266
versions:
@@ -457,10 +459,11 @@ dynamodb_BatchWriteItem:
457459
Swift:
458460
versions:
459461
- sdk_version: 1
460-
github: swift/example_code/ddb/
462+
github: swift/example_code/dynamodb/
461463
excerpts:
462464
- description:
463465
snippet_tags:
466+
- ddb.swift.import
464467
- ddb.swift.basics.populate
465468
Bash:
466469
versions:
@@ -585,10 +588,11 @@ dynamodb_DeleteTable:
585588
Swift:
586589
versions:
587590
- sdk_version: 1
588-
github: swift/example_code/ddb
591+
github: swift/example_code/dynamodb
589592
excerpts:
590593
- description:
591594
snippet_tags:
595+
- ddb.swift.import
592596
- ddb.swift.basics.deletetable
593597
Bash:
594598
versions:
@@ -720,10 +724,11 @@ dynamodb_PutItem:
720724
Swift:
721725
versions:
722726
- sdk_version: 1
723-
github: swift/example_code/ddb
727+
github: swift/example_code/dynamodb
724728
excerpts:
725729
- description:
726730
snippet_tags:
731+
- ddb.swift.import
727732
- ddb.swift.basics.add-movie
728733
- ddb.swift.basics.movie.getasitem
729734
Bash:
@@ -846,10 +851,11 @@ dynamodb_GetItem:
846851
Swift:
847852
versions:
848853
- sdk_version: 1
849-
github: swift/example_code/ddb
854+
github: swift/example_code/dynamodb
850855
excerpts:
851856
- description:
852857
snippet_tags:
858+
- ddb.swift.import
853859
- ddb.swift.basics.get
854860
Bash:
855861
versions:
@@ -969,10 +975,11 @@ dynamodb_UpdateItem:
969975
Swift:
970976
versions:
971977
- sdk_version: 1
972-
github: swift/example_code/ddb
978+
github: swift/example_code/dynamodb
973979
excerpts:
974980
- description:
975981
snippet_tags:
982+
- ddb.swift.import
976983
- ddb.swift.basics.update
977984
Bash:
978985
versions:
@@ -1110,10 +1117,11 @@ dynamodb_DeleteItem:
11101117
Swift:
11111118
versions:
11121119
- sdk_version: 1
1113-
github: swift/example_code/ddb
1120+
github: swift/example_code/dynamodb
11141121
excerpts:
11151122
- description:
11161123
snippet_tags:
1124+
- ddb.swift.import
11171125
- ddb.swift.basics.delete
11181126
Bash:
11191127
versions:
@@ -1242,10 +1250,11 @@ dynamodb_ListTables:
12421250
Swift:
12431251
versions:
12441252
- sdk_version: 1
1245-
github: swift/example_code/ddb
1253+
github: swift/example_code/dynamodb
12461254
excerpts:
12471255
- description:
12481256
snippet_tags:
1257+
- ddb.swift.import
12491258
- ddb.swift.databasemanager.gettablelist
12501259
Bash:
12511260
versions:
@@ -1380,10 +1389,11 @@ dynamodb_Query:
13801389
Swift:
13811390
versions:
13821391
- sdk_version: 1
1383-
github: swift/example_code/ddb
1392+
github: swift/example_code/dynamodb
13841393
excerpts:
13851394
- description:
13861395
snippet_tags:
1396+
- ddb.swift.import
13871397
- ddb.swift.basics.getMovies-year
13881398
Bash:
13891399
versions:
@@ -1510,10 +1520,11 @@ dynamodb_Scan:
15101520
Swift:
15111521
versions:
15121522
- sdk_version: 1
1513-
github: swift/example_code/ddb
1523+
github: swift/example_code/dynamodb
15141524
excerpts:
15151525
- description:
15161526
snippet_tags:
1527+
- ddb.swift.import
15171528
- ddb.swift.basics.getmovies-range
15181529
Bash:
15191530
versions:
@@ -1972,7 +1983,7 @@ dynamodb_Scenario_GettingStartedMovies:
19721983
Swift:
19731984
versions:
19741985
- sdk_version: 1
1975-
github: swift/example_code/ddb
1986+
github: swift/example_code/dynamodb
19761987
excerpts:
19771988
- description: A Swift class that handles &DDB; calls to the &Swift;.
19781989
snippet_tags:

.doc_gen/metadata/iam_metadata.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -580,6 +580,7 @@ iam_CreateAccessKey:
580580
excerpts:
581581
- description:
582582
snippet_tags:
583+
- iam.swift.import
583584
- iam.swift.basics.iam.createaccesskey
584585
Bash:
585586
versions:
@@ -688,6 +689,7 @@ iam_DeleteAccessKey:
688689
excerpts:
689690
- description:
690691
snippet_tags:
692+
- iam.swift.import
691693
- iam.swift.basics.iam.deleteaccesskey
692694
Bash:
693695
versions:
@@ -1023,6 +1025,7 @@ iam_CreatePolicy:
10231025
excerpts:
10241026
- description:
10251027
snippet_tags:
1028+
- iam.swift.import
10261029
- iam.swift.basics.iam.createpolicy
10271030
Bash:
10281031
versions:
@@ -1114,6 +1117,7 @@ iam_DeletePolicy:
11141117
excerpts:
11151118
- description:
11161119
snippet_tags:
1120+
- iam.swift.import
11171121
- iam.swift.basics.iam.deletepolicy
11181122
Bash:
11191123
versions:
@@ -1211,6 +1215,7 @@ iam_ListPolicies:
12111215
excerpts:
12121216
- description:
12131217
snippet_tags:
1218+
- iam.swift.import
12141219
- iam.swift.listpolicies.handler.listpolicies
12151220
C++:
12161221
versions:
@@ -1298,6 +1303,7 @@ iam_GetPolicy:
12981303
excerpts:
12991304
- description:
13001305
snippet_tags:
1306+
- iam.swift.import
13011307
- iam.swift.getpolicy.handler.getpolicy
13021308
C++:
13031309
versions:
@@ -1419,6 +1425,7 @@ iam_AttachRolePolicy:
14191425
excerpts:
14201426
- description:
14211427
snippet_tags:
1428+
- iam.swift.import
14221429
- iam.swift.attachrolepolicy.handler.attachrolepolicy
14231430
JavaScript:
14241431
versions:
@@ -1535,6 +1542,7 @@ iam_ListAttachedRolePolicies:
15351542
excerpts:
15361543
- description:
15371544
snippet_tags:
1545+
- iam.swift.import
15381546
- iam.swift.listattachedrolepolicies.handler.listattachedrolepolicies
15391547
services:
15401548
iam: {ListAttachedRolePolicies}
@@ -1636,6 +1644,7 @@ iam_DetachRolePolicy:
16361644
excerpts:
16371645
- description:
16381646
snippet_tags:
1647+
- iam.swift.import
16391648
- iam.swift.basics.iam.detachrolepolicy
16401649
Bash:
16411650
versions:
@@ -1742,6 +1751,7 @@ iam_CreateRole:
17421751
excerpts:
17431752
- description:
17441753
snippet_tags:
1754+
- iam.swift.import
17451755
- iam.swift.createrole.handler.createrole
17461756
JavaScript:
17471757
versions:
@@ -1849,6 +1859,7 @@ iam_ListRoles:
18491859
excerpts:
18501860
- description:
18511861
snippet_tags:
1862+
- iam.swift.import
18521863
- iam.swift.listroles.handler.listroles
18531864
services:
18541865
iam: {ListRoles}
@@ -1922,6 +1933,7 @@ iam_GetRole:
19221933
excerpts:
19231934
- description:
19241935
snippet_tags:
1936+
- iam.swift.import
19251937
- iam.swift.getrole.handler.getrole
19261938
services:
19271939
iam: {GetRole}
@@ -1986,6 +1998,7 @@ iam_DeleteRole:
19861998
excerpts:
19871999
- description:
19882000
snippet_tags:
2001+
- iam.swift.import
19892002
- iam.swift.basics.iam.deleterole
19902003
Bash:
19912004
versions:
@@ -2100,6 +2113,7 @@ iam_ListRolePolicies:
21002113
excerpts:
21012114
- description:
21022115
snippet_tags:
2116+
- iam.swift.import
21032117
- iam.swift.listrolepolicies.handler.listrolepolicies
21042118
services:
21052119
iam: {ListRolePolicies}
@@ -2201,6 +2215,7 @@ iam_CreateUser:
22012215
excerpts:
22022216
- description:
22032217
snippet_tags:
2218+
- iam.swift.import
22042219
- iam.swift.createuser.handler.createuser
22052220
Go:
22062221
versions:
@@ -2344,6 +2359,7 @@ iam_DeleteUser:
23442359
excerpts:
23452360
- description:
23462361
snippet_tags:
2362+
- iam.swift.import
23472363
- iam.swift.basics.iam.deleteuser
23482364
Bash:
23492365
versions:
@@ -2467,6 +2483,7 @@ iam_ListUsers:
24672483
excerpts:
24682484
- description:
24692485
snippet_tags:
2486+
- iam.swift.import
24702487
- iam.swift.listusers.handler.listusers
24712488
Go:
24722489
versions:
@@ -2675,6 +2692,7 @@ iam_PutUserPolicy:
26752692
excerpts:
26762693
- description:
26772694
snippet_tags:
2695+
- iam.swift.import
26782696
- iam.swift.basics.iam.putuserpolicy
26792697
services:
26802698
iam: {PutUserPolicy}
@@ -2734,6 +2752,7 @@ iam_DeleteUserPolicy:
27342752
excerpts:
27352753
- description:
27362754
snippet_tags:
2755+
- iam.swift.import
27372756
- iam.swift.basics.iam.deleteuserpolicy
27382757
services:
27392758
iam: {DeleteUserPolicy}
@@ -3095,6 +3114,7 @@ iam_ListGroups:
30953114
excerpts:
30963115
- description:
30973116
snippet_tags:
3117+
- iam.swift.import
30983118
- iam.swift.listgroups.handler.listgroups
30993119
services:
31003120
iam: {ListGroups}
@@ -3181,6 +3201,7 @@ iam_CreateServiceLinkedRole:
31813201
excerpts:
31823202
- description:
31833203
snippet_tags:
3204+
- iam.swift.import
31843205
- iam.swift.createservicelinkedrole.handler.createservicelinkedrole
31853206
services:
31863207
iam: {CreateServiceLinkedRole}

0 commit comments

Comments
 (0)