Skip to content
This repository was archived by the owner on May 8, 2026. It is now read-only.

Commit 2e567b2

Browse files
committed
fix: correct FirestoreAdminClient source link in documentation
The FirestoreAdminClient source code resides in the `google-cloud-firestore-admin` directory, which differs from the artifact ID (`google-cloud-firestore`). This mismatch causes the generated GitHub source links in the documentation to be broken. This change adds `library_path_overrides` to `.repo-metadata.json` to explicitly map `FirestoreAdminClient` to the correct source directory. Fixes: b/442875200
1 parent adc4137 commit 2e567b2

2 files changed

Lines changed: 26 additions & 1 deletion

File tree

.repo-metadata.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,14 @@
1010
"repo": "googleapis/java-firestore",
1111
"repo_short": "java-firestore",
1212
"distribution_name": "com.google.cloud:google-cloud-firestore",
13+
"library_path_overrides": {
14+
"FirestoreAdminClient": "google-cloud-firestore-admin"
15+
},
1316
"api_id": "firestore.googleapis.com",
1417
"library_type": "GAPIC_COMBO",
1518
"requires_billing": true,
1619
"codeowner_team": "@googleapis/api-firestore @googleapis/firestore-dpe",
1720
"excluded_poms": "google-cloud-firestore,google-cloud-firestore-bom",
1821
"issue_tracker": "https://issuetracker.google.com/savedsearches/5337669",
1922
"recommended_package": "com.google.cloud.firestore"
20-
}
23+
}

owlbot.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
"""This script is used to synthesize generated parts of this library."""
1616

17+
import json
1718
import synthtool as s
1819
import synthtool.gcp as gcp
1920
import synthtool.languages.java as java
@@ -97,3 +98,24 @@
9798
'.github/workflows/samples.yaml',
9899
'renovate.json'
99100
])
101+
102+
# Fix for b/442875200: Inject library_path_overrides for FirestoreAdminClient
103+
# This ensures the doclet links to the correct source directory (google-cloud-firestore-admin)
104+
# instead of the default artifactId (google-cloud-firestore).
105+
metadata_path = ".repo-metadata.json"
106+
try:
107+
with open(metadata_path, "r") as f:
108+
metadata = json.load(f)
109+
110+
# Add the override map if it doesn't exist or update it
111+
if "library_path_overrides" not in metadata:
112+
metadata["library_path_overrides"] = {}
113+
114+
metadata["library_path_overrides"]["FirestoreAdminClient"] = "google-cloud-firestore-admin"
115+
116+
# Write the updated metadata back to the file
117+
with open(metadata_path, "w") as f:
118+
json.dump(metadata, f, indent=2)
119+
f.write("\n")
120+
except Exception as e:
121+
print(f"Failed to update .repo-metadata.json: {e}")

0 commit comments

Comments
 (0)