Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(google-api-go-generator): add patch for compute mtls endpoint #761

Merged
merged 2 commits into from Dec 2, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions google-api-go-generator/gen.go
Expand Up @@ -499,6 +499,11 @@ func (a *API) mtlsAPIBaseURL() string {
if a.doc.MTLSRootURL != "" {
return resolveRelative(a.doc.MTLSRootURL, a.doc.ServicePath)
}
// TODO(andyrzhao): Remove the workaround below when MTLSRootURL becomes available in
// compute discovery doc, after compute migrates to OP discovery doc gen (ETA 2021).
if a.doc.MTLSRootURL == "" && a.doc.RootURL == "https://compute.googleapis.com/" {
return resolveRelative("https://compute.mtls.googleapis.com/", a.doc.ServicePath)
}
return ""
}

Expand Down