I'm hoping some one can help me out here, maybe give me an idea of what to look for. When I run the service generator on my discovery file I get the following output:
Generation Settings:
Output Directory: ~/Desktop/endpointsDiscovery RPC URL: https://www.googleapis.com/rpc?prettyPrint=false
Api Log Dir: ~/Desktop/endpoints
Flags:
- Use service name directory: NO
- Remove unknown files: NO
- Add 'Generated' directory: NO
- Allow rootURL overrides: YES Loading API File(s):
- Fetching ~/Desktop/myendpoint-v1-rest.discovery ERROR: The api description doesn't appear to be a discovery rpc description Generating: Writing:
- No changes from what is already on disk.
I tried running it both with the verbose flag and by giving it a directory to write logs in and neither gives me anymore information. I generated the endpoint using eclipse and the API works in the API explorer.
Turns out I failed to notice that eclipse generated rest instead of rpc discovery files. You can find a work around here. Thanks @PaulR
This probably doesn't apply to most people, but if you are using Android Studio and use gradle on the backend module, the discovery docs can be automatically generated by setting
getClientLibsOnBuild = true
in the module's gradle file:The discovery docs are located in
<project>/<module>/build/discovery-docs/
. If they aren't generated, try deploying to App Engine, that did it for me.ServiceGenerator needs a discovery file in rpc format instead of rest format. You can specify the format with the argument -f rpc
An example:
{your_path_to_appengine_sdk}/endpoints.sh get-discovery-doc -f rpc your.package.yourAPIclass