为iOS端点生成的发现文件失败 [英] Generated discovery file for iOS endpoints fails

查看:91
本文介绍了为iOS端点生成的发现文件失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望有人能帮助我,也许给我一个想法。
当我在发现文件上运行服务生成器时,我得到以下输出:


生成设置:

输出目录:〜/桌面/端点



发现RPC网址: https://www.googleapis.com/rpc?prettyPrint=false

API日志目录:〜/桌面/端点

标志:



  • 使用服务名称目录:NO

  • 移除未知文件:

  • 添加'生成'目录:否
  • 允许rootURL覆盖:是
    加载API文件: 获取〜/桌面/ myendpoint-v1-rest.discovery
    错误:api描述看起来并不是一个发现rpc
    描述
    生成:
    写作:

  • 没有更改磁盘上的内容。


用它来运行它详细的标志,并给它一个目录写入日志,既不给我任何信息。我使用eclipse生成了端点,API在API浏览器中工作。

解决方案

ServiceGenerator需要 rpc中的发现文件格式,而不是 rest 格式。
您可以使用参数 -f rpc



来指定格式。例如:

{your_path_to_appengine_sdk} /endpoints.sh get-discovery-doc -f rpc your.package.yourAPIclass


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/endpoints

Discovery 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.

解决方案

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

这篇关于为iOS端点生成的发现文件失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆