Skip to content

Commit

Permalink
fix(docs): www discovery link (#87)
Browse files Browse the repository at this point in the history
  • Loading branch information
callmehiphop authored and JustinBeckwith committed Jan 16, 2019
1 parent c5de9e3 commit d651cc0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ const Asset = {
* @property {string} discoveryDocumentUri
* The URL of the discovery document containing the resource's JSON schema.
* For example:
* `"https://www.googleapis.com/discovery/v1/apis/compute/v1/rest"`.
* [`"https://www.googleapis.com/discovery/v1/apis/compute/v1/rest"`](https://www.googleapis.com/discovery/v1/apis/compute/v1/rest).
* It will be left unspecified for resources without a discovery-based API,
* such as Cloud Bigtable.
*
Expand Down Expand Up @@ -141,4 +141,4 @@ const Asset = {
*/
const Resource = {
// This is for documentation. Actual contents will be loaded by gRPC.
};
};
5 changes: 5 additions & 0 deletions packages/google-cloud-asset/synth.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@
s.copy(templates)

# [START fix-dead-link]
discovery_url = 'https://www.googleapis.com/discovery/v1/apis/compute/v1/rest'
s.replace('**/doc/google/cloud/asset/v1beta1/doc_assets.js',
f'`"{discovery_url}"`'
f'[`"{discovery_url}"`]({discovery_url})')

s.replace('**/doc/google/protobuf/doc_timestamp.js',
'https:\/\/cloud\.google\.com[\s\*]*http:\/\/(.*)[\s\*]*\)',
r"https://\1)")
Expand Down

0 comments on commit d651cc0

Please sign in to comment.