-
Notifications
You must be signed in to change notification settings - Fork 317
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
feat: add support for universe domain #4675
Conversation
🤖 I detect that the PR title and the commit message differ and there's only one commit. To use the PR title for the commit history, you can use Github's automerge feature with squashing, or use -- conventional-commit-lint bot |
generator/tests/testdata/golden/php/default/endpoints_google_owned.golden
Show resolved
Hide resolved
@@ -331,8 +331,11 @@ def _NormalizeUrlComponents(self): | |||
scheme = url_parts.scheme or 'https' | |||
service_host = url_parts.netloc or _DEFAULT_SERVICE_HOST | |||
base_path = url_parts.path | |||
if not root_url: | |||
if root_url: | |||
self._api.SetTemplateValue('rootUrlTemplate', root_url.replace('googleapis.com', 'UNIVERSE_DOMAIN')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might break though, if users have a rooturl like:
usergoogleapis.com
, it would be changed to userUNIVERSE_DOMAIN
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure though how big of a usecase this is... a client using TPC and their domain name has googleapis.com
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we could replace .googleapis.com
with .UNIVERSE_DOMAIN
if you think that would be safer.
0d0bf65
to
6889d28
Compare
adds new
$rootUrlTemplate
property to all service classes in order to support the universe domain option in googleapis/google-api-php-client#2563