Skip to content

Commit d5528ba

Browse files
billyjacobsonGautamSharda
authored andcommitted
fix: Renaming region tags to not conflict with documentation snippets (#834)
* Moving API reference snippets and renaming region tags to not conflict with documentation snippets * fix mismatched tags, fix mixed backups files * fix quickstart tag * linkenator fix
1 parent a16036e commit d5528ba

10 files changed

Lines changed: 158 additions & 152 deletions

File tree

handwritten/bigtable/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,12 @@ Samples are in the [`samples/`](https://github.com/googleapis/nodejs-bigtable/tr
8989

9090
| Sample | Source Code | Try it |
9191
| --------------------------- | --------------------------------- | ------ |
92-
| Backups.create | [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/backups.create.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/backups.create.js,samples/README.md) |
93-
| Backups.delete | [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/backups.delete.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/backups.delete.js,samples/README.md) |
94-
| Backups.get | [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/backups.get.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/backups.get.js,samples/README.md) |
95-
| Backups.list | [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/backups.list.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/backups.list.js,samples/README.md) |
96-
| Backups.restore | [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/backups.restore.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/backups.restore.js,samples/README.md) |
97-
| Backups.update | [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/backups.update.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/backups.update.js,samples/README.md) |
92+
| Backups.create | [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/api-reference-doc-snippets/backups.create.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/api-reference-doc-snippets/backups.create.js,samples/README.md) |
93+
| Backups.delete | [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/api-reference-doc-snippets/backups.delete.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/api-reference-doc-snippets/backups.delete.js,samples/README.md) |
94+
| Backups.get | [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/api-reference-doc-snippets/backups.get.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/api-reference-doc-snippets/backups.get.js,samples/README.md) |
95+
| Backups.list | [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/api-reference-doc-snippets/backups.list.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/api-reference-doc-snippets/backups.list.js,samples/README.md) |
96+
| Backups.restore | [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/api-reference-doc-snippets/backups.restore.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/api-reference-doc-snippets/backups.restore.js,samples/README.md) |
97+
| Backups.update | [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/api-reference-doc-snippets/backups.update.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/api-reference-doc-snippets/backups.update.js,samples/README.md) |
9898
| Filter Snippets | [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/filterSnippets.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/filterSnippets.js,samples/README.md) |
9999
| Instances | [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/instances.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/instances.js,samples/README.md) |
100100
| Quickstart | [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) |

handwritten/bigtable/linkinator.config.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,13 @@
33
"skip": [
44
"https://codecov.io/gh/googleapis/",
55
"www.googleapis.com",
6-
"img.shields.io"
6+
"img.shields.io",
7+
"https://github.com/googleapis/nodejs-bigtable/blob/master/samples/api-reference-doc-snippets/backups.create.js",
8+
"https://github.com/googleapis/nodejs-bigtable/blob/master/samples/api-reference-doc-snippets/backups.delete.js",
9+
"https://github.com/googleapis/nodejs-bigtable/blob/master/samples/api-reference-doc-snippets/backups.get.js",
10+
"https://github.com/googleapis/nodejs-bigtable/blob/master/samples/api-reference-doc-snippets/backups.list.js",
11+
"https://github.com/googleapis/nodejs-bigtable/blob/master/samples/api-reference-doc-snippets/backups.restore.js",
12+
"https://github.com/googleapis/nodejs-bigtable/blob/master/samples/api-reference-doc-snippets/backups.update.js"
713
],
814
"silent": true,
915
"concurrency": 10

handwritten/bigtable/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"lint": "gts check",
3737
"prepare": "npm run compile",
3838
"samples-test": "cd samples/ && npm link ../ && npm install && npm test && cd ../",
39-
"snippet-test": "mocha samples/document-snippets/tests/*.js --timeout 600000",
39+
"snippet-test": "mocha samples/api-reference-doc-snippets/tests/*.js --timeout 600000",
4040
"presystem-test": "npm run compile",
4141
"system-test": "mocha build/system-test --timeout 600000",
4242
"pretest": "npm run compile",

handwritten/bigtable/src/app-profile.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,8 @@ Please use the format 'my-app-profile' or '${instance.name}/appProfiles/my-app-p
230230
* @param {object} [options] See {@link Instance#createAppProfile}.
231231
*
232232
* @example
233-
* <caption>include:samples/document-snippets/app-profile.js</caption>
234-
* region_tag:bigtable_create_app_profile
233+
* <caption>include:samples/api-reference-doc-snippets/app-profile.js</caption>
234+
* region_tag:bigtable_api_create_app_profile
235235
*/
236236
create(
237237
optionsOrCallback?: AppProfileOptions | CreateAppProfileCallback,
@@ -264,8 +264,8 @@ Please use the format 'my-app-profile' or '${instance.name}/appProfiles/my-app-p
264264
* @param {object} callback.apiResponse The full API response.
265265
*
266266
* @example
267-
* <caption>include:samples/document-snippets/app-profile.js</caption>
268-
* region_tag:bigtable_delete_app_profile
267+
* <caption>include:samples/api-reference-doc-snippets/app-profile.js</caption>
268+
* region_tag:bigtable_api_delete_app_profile
269269
*/
270270
delete(
271271
optionsOrCallback?: DeleteAppProfileOptions | DeleteAppProfileCallback,
@@ -309,8 +309,8 @@ Please use the format 'my-app-profile' or '${instance.name}/appProfiles/my-app-p
309309
* @param {boolean} callback.exists Whether the app profile exists or not.
310310
*
311311
* @example
312-
* <caption>include:samples/document-snippets/app-profile.js</caption>
313-
* region_tag:bigtable_exists_app_profile
312+
* <caption>include:samples/api-reference-doc-snippets/app-profile.js</caption>
313+
* region_tag:bigtable_api_exists_app_profile
314314
*/
315315
exists(
316316
optionsOrCallback?: CallOptions | AppProfileExistsCallback,
@@ -343,8 +343,8 @@ Please use the format 'my-app-profile' or '${instance.name}/appProfiles/my-app-p
343343
* https://googleapis.github.io/gax-nodejs/CallSettings.html.
344344
*
345345
* @example
346-
* <caption>include:samples/document-snippets/app-profile.js</caption>
347-
* region_tag:bigtable_get_app_profile
346+
* <caption>include:samples/api-reference-doc-snippets/app-profile.js</caption>
347+
* region_tag:bigtable_api_get_app_profile
348348
*/
349349
get(
350350
optionsOrCallback?: CallOptions | GetAppProfileCallback,
@@ -381,8 +381,8 @@ Please use the format 'my-app-profile' or '${instance.name}/appProfiles/my-app-p
381381
* @param {object} callback.apiResponse The full API response.
382382
*
383383
* @example
384-
* <caption>include:samples/document-snippets/app-profile.js</caption>
385-
* region_tag:bigtable_app_profile_get_meta
384+
* <caption>include:samples/api-reference-doc-snippets/app-profile.js</caption>
385+
* region_tag:bigtable_api_app_profile_get_meta
386386
*/
387387
getMetadata(
388388
optionsOrCallback?: CallOptions | GetAppProfileMetadataCallback,
@@ -435,8 +435,8 @@ Please use the format 'my-app-profile' or '${instance.name}/appProfiles/my-app-p
435435
* @param {object} callback.apiResponse The full API response.
436436
*
437437
* @example
438-
* <caption>include:samples/document-snippets/app-profile.js</caption>
439-
* region_tag:bigtable_app_profile_set_meta
438+
* <caption>include:samples/api-reference-doc-snippets/app-profile.js</caption>
439+
* region_tag:bigtable_api_app_profile_set_meta
440440
*/
441441
setMetadata(
442442
metadata: AppProfileOptions,

handwritten/bigtable/src/backup.ts

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -258,8 +258,8 @@ Please use the format 'my-backup' or '${cluster.name}/backups/my-backup'.`);
258258
* @param {object} callback.apiResponse The full API response.
259259
* @return {void | Promise<CreateBackupResponse>}
260260
*
261-
* @example <caption>include:samples/backups.create.js</caption>
262-
* region_tag:bigtable_create_backup
261+
* @example <caption>include:samples/api-reference-doc-snippets/backups.create.js</caption>
262+
* region_tag:bigtable_api_create_backup
263263
*/
264264
create(
265265
config: CreateBackupConfig,
@@ -280,8 +280,8 @@ Please use the format 'my-backup' or '${cluster.name}/backups/my-backup'.`);
280280
* @param {object} callback.apiResponse The full API response.
281281
* @return {void | Promise<DeleteBackupResponse>}
282282
*
283-
* @example <caption>include:samples/backups.delete.js</caption>
284-
* region_tag:bigtable_delete_backup
283+
* @example <caption>include:samples/api-reference-doc-snippets/backups.delete.js</caption>
284+
* region_tag:bigtable_api_delete_backup
285285
*/
286286
delete(
287287
gaxOptionsOrCallback?: CallOptions | DeleteBackupCallback,
@@ -354,8 +354,8 @@ Please use the format 'my-backup' or '${cluster.name}/backups/my-backup'.`);
354354
* @param {Backup} callback.backup The Backup instance.
355355
* @param {object} callback.apiResponse The full API response.
356356
*
357-
* @example <caption>include:samples/backups.get.js</caption>
358-
* region_tag:bigtable_get_backup
357+
* @example <caption>include:samples/api-reference-doc-snippets/backups.get.js</caption>
358+
* region_tag:bigtable_api_get_backup
359359
*/
360360
get(
361361
gaxOptionsOrCallback?: CallOptions | GetBackupCallback,
@@ -392,8 +392,8 @@ Please use the format 'my-backup' or '${cluster.name}/backups/my-backup'.`);
392392
* @param {?error} callback.error An error returned while making this request.
393393
* @param {Policy} policy The policy.
394394
*
395-
* @example <caption>include:samples/document-snippets/instance.js</caption>
396-
* region_tag:bigtable_get_table_Iam_policy
395+
* @example <caption>include:samples/api-reference-doc-snippets/instance.js</caption>
396+
* region_tag:bigtable_api_get_table_Iam_policy
397397
*/
398398
getIamPolicy(
399399
optionsOrCallback?: GetIamPolicyOptions | GetIamPolicyCallback,
@@ -423,8 +423,8 @@ Please use the format 'my-backup' or '${cluster.name}/backups/my-backup'.`);
423423
* @param {object} callback.metadata The metadata.
424424
* @param {object} callback.apiResponse The full API response.
425425
*
426-
* @example <caption>include:samples/backups.get.js</caption>
427-
* region_tag:bigtable_get_backup
426+
* @example <caption>include:samples/api-reference-doc-snippets/backups.get.js</caption>
427+
* region_tag:bigtable_api_get_backup
428428
*/
429429
getMetadata(
430430
gaxOptionsOrCallback?: CallOptions | BackupGetMetadataCallback,
@@ -482,8 +482,8 @@ Please use the format 'my-backup' or '${cluster.name}/backups/my-backup'.`);
482482
* @param {object} callback.apiResponse The full API response.
483483
* @return {void | Promise<RestoreTableResponse>}
484484
*
485-
* @example <caption>include:samples/backups.restore.js</caption>
486-
* region_tag:bigtable_restore_backup
485+
* @example <caption>include:samples/api-reference-doc-snippets/backups.restore.js</caption>
486+
* region_tag:bigtable_api_restore_backup
487487
*/
488488
restore(
489489
tableId: string,
@@ -538,8 +538,8 @@ Please use the format 'my-backup' or '${cluster.name}/backups/my-backup'.`);
538538
* @param {?error} callback.error An error returned while making this request.
539539
* @param {Policy} policy The policy.
540540
*
541-
* @example <caption>include:samples/document-snippets/instance.js</caption>
542-
* region_tag:bigtable_set_instance_Iam_policy
541+
* @example <caption>include:samples/api-reference-doc-snippets/instance.js</caption>
542+
* region_tag:bigtable_api_set_instance_Iam_policy
543543
*/
544544
setIamPolicy(
545545
policy: Policy,
@@ -577,8 +577,8 @@ Please use the format 'my-backup' or '${cluster.name}/backups/my-backup'.`);
577577
* @param {object} callback.apiResponse The full API response.
578578
* @return {void | Promise<BackupSetMetadataResponse>}
579579
*
580-
* @example <caption>include:samples/backups.update.js</caption>
581-
* region_tag:bigtable_update_backup
580+
* @example <caption>include:samples/api-reference-doc-snippets/backups.update.js</caption>
581+
* region_tag:bigtable_api_update_backup
582582
*/
583583
setMetadata(
584584
metadata: ModifiableBackupFields,
@@ -644,8 +644,8 @@ Please use the format 'my-backup' or '${cluster.name}/backups/my-backup'.`);
644644
* @param {string[]} permissions A subset of permissions that the caller is
645645
* allowed.
646646
*
647-
* @example <caption>include:samples/document-snippets/instance.js</caption>
648-
* region_tag:bigtable_test_table_Iam_permissions
647+
* @example <caption>include:samples/api-reference-doc-snippets/instance.js</caption>
648+
* region_tag:bigtable_api_test_table_Iam_permissions
649649
*/
650650
testIamPermissions(
651651
permissions: string | string[],

handwritten/bigtable/src/cluster.ts

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -222,8 +222,8 @@ Please use the format 'my-cluster' or '${instance.name}/clusters/my-cluster'.`);
222222
* request.
223223
* @param {object} callback.apiResponse The full API response.
224224
*
225-
* @example <caption>include:samples/document-snippets/cluster.js</caption>
226-
* region_tag:bigtable_create_cluster
225+
* @example <caption>include:samples/api-reference-doc-snippets/cluster.js</caption>
226+
* region_tag:bigtable_api_create_cluster
227227
*/
228228
create(
229229
optionsOrCallback?: CreateClusterOptions | CreateClusterCallback,
@@ -267,8 +267,8 @@ Please use the format 'my-cluster' or '${instance.name}/clusters/my-cluster'.`);
267267
* @param {object} callback.apiResponse The full API response.
268268
* @return {void | Promise<CreateBackupResponse>}
269269
*
270-
* @example <caption>include:samples/backups.create.js</caption>
271-
* region_tag:bigtable_create_backup
270+
* @example <caption>include:samples/api-reference-doc-snippets/backups.create.js</caption>
271+
* region_tag:bigtable_api_create_backup
272272
*/
273273
createBackup(
274274
id: string,
@@ -341,8 +341,8 @@ Please use the format 'my-cluster' or '${instance.name}/clusters/my-cluster'.`);
341341
* request.
342342
* @param {object} callback.apiResponse The full API response.
343343
*
344-
* @example <caption>include:samples/document-snippets/cluster.js</caption>
345-
* region_tag:bigtable_delete_cluster
344+
* @example <caption>include:samples/api-reference-doc-snippets/cluster.js</caption>
345+
* region_tag:bigtable_api_delete_cluster
346346
*/
347347
delete(
348348
gaxOptionsOrCallback?: CallOptions | DeleteClusterCallback,
@@ -382,8 +382,8 @@ Please use the format 'my-cluster' or '${instance.name}/clusters/my-cluster'.`);
382382
* request.
383383
* @param {boolean} callback.exists Whether the cluster exists or not.
384384
*
385-
* @example <caption>include:samples/document-snippets/cluster.js</caption>
386-
* region_tag:bigtable_exists_cluster
385+
* @example <caption>include:samples/api-reference-doc-snippets/cluster.js</caption>
386+
* region_tag:bigtable_api_exists_cluster
387387
*/
388388
exists(
389389
gaxOptionsOrCallback?: CallOptions | ExistsClusterCallback,
@@ -425,8 +425,8 @@ Please use the format 'my-cluster' or '${instance.name}/clusters/my-cluster'.`);
425425
* request.
426426
* @param {object} callback.apiResponse The full API response.
427427
*
428-
* @example <caption>include:samples/document-snippets/cluster.js</caption>
429-
* region_tag:bigtable_get_cluster
428+
* @example <caption>include:samples/api-reference-doc-snippets/cluster.js</caption>
429+
* region_tag:bigtable_api_get_cluster
430430
*/
431431
get(
432432
gaxOptionsOrCallback?: CallOptions | GetClusterCallback,
@@ -461,8 +461,8 @@ Please use the format 'my-cluster' or '${instance.name}/clusters/my-cluster'.`);
461461
* @param {object} callback.apiResponse The full API response.
462462
* @return {void | Promise<ListBackupsResponse>}
463463
*
464-
* @example <caption>include:samples/backups.list.js</caption>
465-
* region_tag:bigtable_list_backups
464+
* @example <caption>include:samples/api-reference-doc-snippets/backups.list.js</caption>
465+
* region_tag:bigtable_api_list_backups
466466
*/
467467
getBackups(
468468
optionsOrCallback?: GetBackupsOptions | GetBackupsCallback,
@@ -612,8 +612,8 @@ Please use the format 'my-cluster' or '${instance.name}/clusters/my-cluster'.`);
612612
* @param {object} callback.metadata The metadata.
613613
* @param {object} callback.apiResponse The full API response.
614614
*
615-
* @example <caption>include:samples/document-snippets/cluster.js</caption>
616-
* region_tag:bigtable_cluster_get_meta
615+
* @example <caption>include:samples/api-reference-doc-snippets/cluster.js</caption>
616+
* region_tag:bigtable_api_cluster_get_meta
617617
*/
618618
getMetadata(
619619
gaxOptionsOrCallback?: CallOptions | GetClusterMetadataCallback,
@@ -670,8 +670,8 @@ Please use the format 'my-cluster' or '${instance.name}/clusters/my-cluster'.`);
670670
* to check the status of the request.
671671
* @param {object} callback.apiResponse The full API response.
672672
*
673-
* @example <caption>include:samples/document-snippets/cluster.js</caption>
674-
* region_tag:bigtable_cluster_set_meta
673+
* @example <caption>include:samples/api-reference-doc-snippets/cluster.js</caption>
674+
* region_tag:bigtable_api_cluster_set_meta
675675
*/
676676
setMetadata(
677677
metadata: SetClusterMetadataOptions,

0 commit comments

Comments
 (0)