Skip to content

Commit 1f66dca

Browse files
fix: correct FirestoreAdminClient source link in documentation (#2304)
* 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 * chore: generate libraries at Wed Jan 28 18:54:55 UTC 2026 --------- Co-authored-by: cloud-java-bot <[email protected]>
1 parent e750393 commit 1f66dca

File tree

2 files changed

+27
-2
lines changed

2 files changed

+27
-2
lines changed

.repo-metadata.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,8 @@
1616
"codeowner_team": "@googleapis/api-firestore @googleapis/firestore-dpe",
1717
"excluded_poms": "google-cloud-firestore,google-cloud-firestore-bom",
1818
"issue_tracker": "https://issuetracker.google.com/savedsearches/5337669",
19-
"recommended_package": "com.google.cloud.firestore"
20-
}
19+
"recommended_package": "com.google.cloud.firestore",
20+
"library_path_overrides": {
21+
"FirestoreAdminClient": "google-cloud-firestore-admin"
22+
}
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)