diff --git a/synthtool/gcp/templates/java_library/README.md b/synthtool/gcp/templates/java_library/README.md index 8f6697b97..1a340d444 100644 --- a/synthtool/gcp/templates/java_library/README.md +++ b/synthtool/gcp/templates/java_library/README.md @@ -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: @@ -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 -%} {{ group_id }} @@ -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 diff --git a/tests/fixtures/java_templates/release-please-update/.repo-metadata.json b/tests/fixtures/java_templates/release-please-update/.repo-metadata.json index 38f8e6d68..98d7242a5 100644 --- a/tests/fixtures/java_templates/release-please-update/.repo-metadata.json +++ b/tests/fixtures/java_templates/release-please-update/.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", diff --git a/tests/fixtures/java_templates/standard/.repo-metadata.json b/tests/fixtures/java_templates/standard/.repo-metadata.json index 38f8e6d68..98d7242a5 100644 --- a/tests/fixtures/java_templates/standard/.repo-metadata.json +++ b/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",