我尝试使用从我的API端点(在golang上运行)检索到的发现文档生成java客户端库,但未能通过以下消息生成。
endpointscfg.py gen_client_lib java happylaundry.rest.discovery
Traceback (most recent call last):
File "//Users/lorenz/go/go_appengine/endpointscfg.py", line 133, in <module>
run_file(__file__, globals())
File "//Users/lorenz/go/go_appengine/endpointscfg.py", line 129, in run_file
execfile(_PATHS.script_file(script_name), globals_)
File "/Users/lorenz/go/go_appengine/google/appengine/tools/endpointscfg.py", line 561, in <module>
main(sys.argv)
File "/Users/lorenz/go/go_appengine/google/appengine/tools/endpointscfg.py", line 557, in main
args.callback(args)
File "/Users/lorenz/go/go_appengine/google/appengine/tools/endpointscfg.py", line 458, in _GenClientLibCallback
args.build_system)
File "/Users/lorenz/go/go_appengine/google/appengine/tools/endpointscfg.py", line 335, in _GenClientLib
build_system, client_name)
File "/Users/lorenz/go/go_appengine/google/appengine/tools/endpointscfg.py", line 366, in _GenClientLibFromContents
raise ServerRequestException(error)
__main__.ServerRequestException: HTTP 500 (Internal Server Error) error when communicating with URL: https://google-api-client-libraries.appspot.com/generate. Response:
我尝试使用相同的命令并为一个非常简单的程序生成,并且它在没有errro的情况下运行。从发现文档的语法或结构来看,我看不出任何错误。你们有什么想法吗?
答案 0 :(得分:0)
我从&#34; schema&#34;中删除了这部分来自发现文档的部分,它可以工作。
&#34;订单&#34;:{ &#34; id&#34;:&#34;订单&#34;, &#34;输入&#34;:&#34;对象&#34;, &#34;属性&#34;:{ &#34; addressArea&#34;:{ &#34;输入&#34;:&#34; string&#34; }, &#34; addressDistrict&#34;:{ &#34;输入&#34;:&#34; string&#34; }, &#34; addressField1&#34;:{ &#34;输入&#34;:&#34; string&#34; }, &#34; addressField2&#34;:{ &#34;输入&#34;:&#34; string&#34; }, &#34; addressField3&#34;:{ &#34;输入&#34;:&#34; string&#34; }, &#34; addressField4&#34;:{ &#34;输入&#34;:&#34; string&#34; }, &#34; amountPayable&#34;:{ &#34;输入&#34;:&#34;整数&#34;, &#34;格式&#34;:&#34; int32&#34; }, &#34;已完成&#34;:{ &#34;输入&#34;:&#34; boolean&#34; }, &#34; createdAt&#34;:{ &#34;输入&#34;:&#34; string&#34;, &#34;格式&#34;:&#34;日期时间&#34; }, &#34; deliveryDate&#34;:{ &#34;输入&#34;:&#34; string&#34;, &#34;格式&#34;:&#34;日期时间&#34; }, &#34; deliveryTimeslot&#34;:{ &#34;输入&#34;:&#34;整数&#34;, &#34;格式&#34;:&#34; int32&#34; }, &#34; id&#34;:{ &#34;输入&#34;:&#34; string&#34; }, &#34; pickupDate&#34;:{ &#34;输入&#34;:&#34; string&#34;, &#34;格式&#34;:&#34;日期时间&#34; }, &#34; pickupDeliveryInstruction&#34;:{ &#34;输入&#34;:&#34; string&#34; }, &#34; pickupTimeslot&#34;:{ &#34;输入&#34;:&#34;整数&#34;, &#34;格式&#34;:&#34; int32&#34; }, &#34; referenceNumber&#34;:{ &#34;输入&#34;:&#34; string&#34; }, &#34; status&#34;:{ &#34;输入&#34;:&#34;整数&#34;, &#34;格式&#34;:&#34; int32&#34; }, &#34; - &#34;:{ &#34;输入&#34;:&#34; string&#34; } } },