Skip to content

Commit

Permalink
chore(java): update variable name to api_shortname in README template (
Browse files Browse the repository at this point in the history
…#1323)

* chore(java): update variable name to api_shortname in README template

* chore: fix test

* chore: fix test
  • Loading branch information
Neenu1995 committed Jan 11, 2022
1 parent 6981da4 commit 6355638
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions synthtool/gcp/templates/java_library/README.md
Expand Up @@ -20,11 +20,11 @@ Java idiomatic client for [{{metadata['repo']['name_pretty']}}][product-docs].

## Quickstart

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

```xml
{{ metadata['snippets'][metadata['repo']['name'] + '_install_with_bom'] }}
{{ metadata['snippets'][metadata['repo']['api_shortname'] + '_install_with_bom'] }}
```

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

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

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

```Groovy
Expand Down
@@ -1,5 +1,5 @@
{
"name": "cloudasset",
"api_shortname": "cloudasset",
"name_pretty": "Cloud Asset Inventory",
"product_documentation": "https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview",
"api_reference": "https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview",
Expand Down
2 changes: 1 addition & 1 deletion tests/fixtures/java_templates/standard/.repo-metadata.json
@@ -1,5 +1,5 @@
{
"name": "cloudasset",
"api_shortname": "cloudasset",
"name_pretty": "Cloud Asset Inventory",
"product_documentation": "https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview",
"api_reference": "https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview",
Expand Down

0 comments on commit 6355638

Please sign in to comment.