You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 19, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Apr 19, 2026. It is now read-only.
After upgrading to 4.6.1, Generated client library for java is using "none" instead of "com". #172
Also, if possible, please share the discovery doc generated with endpointscfg.py gen_discovery_doc. (This discovery doc is what's used to generate the Java client; inspecting it may help me find where the problem lies.)
Yes, but what version did you upgrade from? What's the last version at which it works?
Note that generating discovery docs and clients also requires specifying the hostname, either in the api decorator or on the command line, or in the app.yaml (in that case by using the application specified in the app.yaml). In your second example, it is generating a hostname based on the app.yaml file.
Please make sure that your generate_api.sh script is properly setting a hostname when calling these commands.
That's quite a version jump... But I'll look into it.
And no, when you specify the hostname, you must specify the actual domain name at which your api will be served. If you're using a custom domain, that could be fan.com, but it can't be com.fan.
Yes, that's the issue. It creates the package with it and the endpoint as well. For now, I can the domain manually inside the Fan.Java, is there any automated way to update both?
Nothing changed regarding the handling of owner_domain between 2.5.0 and 4.6.1. However, what did change was that the framework no longer calls an external service to generate discovery docs. (It does still call an external service to generate the Java client files.)
I will investigate whether the external service treated owner_domain differently.
4.6.1 generates discovery docs that are missing the 'etag' and 'ownerDomain' keys. Neither of those keys is documented at https://developers.google.com/discovery/v1/reference/apis but at least the 'ownerDomain' key seems to be important.
Turns out there's actually two ways to specify the owner domain. One way is with owner_domain='example.com'; the other is with namespace=endpoints.Namespace(owner_domain='example.com', owner_name='Example').
The discovery document generation which fed into the Java client generation used to use the first value; now it uses the second value. The problem is this second value is nowhere documented.
Activity
inklesspen commentedon Sep 4, 2018
What version are you upgrading from, please?
inklesspen commentedon Sep 4, 2018
Also, if possible, please share the discovery doc generated with
endpointscfg.py gen_discovery_doc. (This discovery doc is what's used to generate the Java client; inspecting it may help me find where the problem lies.)zonito commentedon Sep 4, 2018
I have upgraded to 4.6.1
zonito commentedon Sep 4, 2018
Discovery content
Baseurl is also showing None.
I am using
gcloudto deploy application so in my app.yaml the "application" and "version" is commented.Earlier, it was using
owner_domainto create package.zonito commentedon Sep 4, 2018
With
applicationandversion, here is the list of files generated which is different from old versions (it was usingowner_domain):inklesspen commentedon Sep 5, 2018
Yes, but what version did you upgrade from? What's the last version at which it works?
Note that generating discovery docs and clients also requires specifying the hostname, either in the api decorator or on the command line, or in the app.yaml (in that case by using the application specified in the app.yaml). In your second example, it is generating a hostname based on the app.yaml file.
Please make sure that your generate_api.sh script is properly setting a hostname when calling these commands.
zonito commentedon Sep 5, 2018
Came from
2.5.0to4.6.1--hostname=com.fanwill do?inklesspen commentedon Sep 5, 2018
That's quite a version jump... But I'll look into it.
And no, when you specify the hostname, you must specify the actual domain name at which your api will be served. If you're using a custom domain, that could be
fan.com, but it can't becom.fan.zonito commentedon Sep 5, 2018
--hostnameworks! 👍zonito commentedon Sep 5, 2018
Yes, that's the issue. It creates the package with it and the endpoint as well. For now, I can the domain manually inside the Fan.Java, is there any automated way to update both?
inklesspen commentedon Sep 5, 2018
Nothing changed regarding the handling of owner_domain between 2.5.0 and 4.6.1. However, what did change was that the framework no longer calls an external service to generate discovery docs. (It does still call an external service to generate the Java client files.)
I will investigate whether the external service treated owner_domain differently.
zonito commentedon Sep 5, 2018
Thanks
inklesspen commentedon Nov 16, 2018
4.6.1 generates discovery docs that are missing the 'etag' and 'ownerDomain' keys. Neither of those keys is documented at https://developers.google.com/discovery/v1/reference/apis but at least the 'ownerDomain' key seems to be important.
inklesspen commentedon Nov 16, 2018
Turns out there's actually two ways to specify the owner domain. One way is with
owner_domain='example.com'; the other is withnamespace=endpoints.Namespace(owner_domain='example.com', owner_name='Example').The discovery document generation which fed into the Java client generation used to use the first value; now it uses the second value. The problem is this second value is nowhere documented.
endpoints-python/endpoints/discovery_generator.py
Lines 880 to 883 in efd350c
inklesspen commentedon Nov 20, 2018
A new version with this fix will be released after the Thanksgiving holiday.
inklesspen commentedon Nov 27, 2018
Frameworks version 4.8.0 has been released, which includes a fix for this issue.
zonito commentedon Dec 11, 2018
Thanks