Skip to content

Commit 6355638

Browse files
authored
chore(java): update variable name to api_shortname in README template (#1323)
* chore(java): update variable name to api_shortname in README template * chore: fix test * chore: fix test
1 parent 6981da4 commit 6355638

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

synthtool/gcp/templates/java_library/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ Java idiomatic client for [{{metadata['repo']['name_pretty']}}][product-docs].
2020

2121
## Quickstart
2222

23-
{% if 'snippets' in metadata and metadata['snippets'][metadata['repo']['name'] + '_install_with_bom'] -%}
23+
{% if 'snippets' in metadata and metadata['snippets'][metadata['repo']['api_shortname'] + '_install_with_bom'] -%}
2424
If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file
2525

2626
```xml
27-
{{ metadata['snippets'][metadata['repo']['name'] + '_install_with_bom'] }}
27+
{{ metadata['snippets'][metadata['repo']['api_shortname'] + '_install_with_bom'] }}
2828
```
2929

3030
If you are using Maven without BOM, add this to your dependencies:
@@ -33,8 +33,8 @@ If you are using Maven, add this to your pom.xml file:
3333
{% endif %}
3434

3535
```xml
36-
{% if 'snippets' in metadata and metadata['snippets'][metadata['repo']['name'] + '_install_without_bom'] -%}
37-
{{ metadata['snippets'][metadata['repo']['name'] + '_install_without_bom'] }}
36+
{% if 'snippets' in metadata and metadata['snippets'][metadata['repo']['api_shortname'] + '_install_without_bom'] -%}
37+
{{ metadata['snippets'][metadata['repo']['api_shortname'] + '_install_without_bom'] }}
3838
{% else -%}
3939
<dependency>
4040
<groupId>{{ group_id }}</groupId>
@@ -44,7 +44,7 @@ If you are using Maven, add this to your pom.xml file:
4444
{% endif -%}
4545
```
4646

47-
{% if 'snippets' in metadata and metadata['snippets'][metadata['repo']['name'] + '_install_with_bom'] -%}
47+
{% if 'snippets' in metadata and metadata['snippets'][metadata['repo']['api_shortname'] + '_install_with_bom'] -%}
4848
If you are using Gradle 5.x or later, add this to your dependencies
4949

5050
```Groovy

tests/fixtures/java_templates/release-please-update/.repo-metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "cloudasset",
2+
"api_shortname": "cloudasset",
33
"name_pretty": "Cloud Asset Inventory",
44
"product_documentation": "https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview",
55
"api_reference": "https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview",

tests/fixtures/java_templates/standard/.repo-metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "cloudasset",
2+
"api_shortname": "cloudasset",
33
"name_pretty": "Cloud Asset Inventory",
44
"product_documentation": "https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview",
55
"api_reference": "https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview",

0 commit comments

Comments
 (0)