dongping2023 2015-12-15 18:11
浏览 34
已采纳

GAE Cloud Endpoints API Explorer停止工作

Out of the blue, the API explorer (localhost:8080/_ah/api/explorer) stopped working. This is the message 'goapp serve' gives:

WARNING  2015-12-15 17:54:24,744 dispatcher.py:762] Skipping dispatch.yaml rules because /_ah/spi/BackendService.getApiConfigs is not a dispatchable path.
2015/12/15 17:54:24 DEBUG: SPI request body: {}
INFO     2015-12-15 17:54:24,746 module.py:787] default: "POST /_ah/spi/BackendService.getApiConfigs HTTP/1.1" 200 2619
ERROR    2015-12-15 17:54:25,706 discovery_api_proxy.py:59] Discovery API proxy failed on /_ah/api/discovery/v1/apis/generate/directory with 400.
Request: {"configs": ["{\"name\": \"test\", \"abstract\": false, \"methods\": {\"test.load_test_data\": {\"path\": \"testData\", \"response\": {\"body\": \"empty\"}, \"rosyMethod\": \"TestAPI.LoadTestData\", \"request\": {\"body\": \"empty\"}, \"httpMethod\": \"POST\"}, \"test.test\": {\"path\": \"test\", \"response\": {\"body\": \"autoTemplate(backendResponse)\", \"bodyName\": \"resource\"}, \"rosyMethod\": \"TestAPI.Test\", \"request\": {\"body\": \"empty\"}, \"httpMethod\": \"GET\"}, \"test.showdata4\": {\"path\": \"showdata4\", \"response\": {\"body\": \"autoTemplate(backendResponse)\", \"bodyName\": \"resource\"}, \"rosyMethod\": \"TestAPI.ShowData4\", \"request\": {\"body\": \"autoTemplate(backendRequest)\", \"bodyName\": \"resource\"}, \"httpMethod\": \"POST\"}, \"test.showdata\": {\"path\": \"showdata\", \"response\": {\"body\": \"autoTemplate(backendResponse)\", \"bodyName\": \"resource\"}, \"rosyMethod\": \"TestAPI.ShowData\", \"request\": {\"body\": \"empty\"}, \"httpMethod\": \"GET\"}, \"test.showdata3\": {\"path\": \"showdata3\", \"response\": {\"body\": \"autoTemplate(backendResponse)\", \"bodyName\": \"resource\"}, \"rosyMethod\": \"TestAPI.ShowData3\", \"request\": {\"body\": \"empty\"}, \"httpMethod\": \"GET\"}, \"test.showdata2\": {\"path\": \"showdata2\", \"response\": {\"body\": \"autoTemplate(backendResponse)\", \"bodyName\": \"resource\"}, \"rosyMethod\": \"TestAPI.ShowData2\", \"request\": {\"body\": \"empty\"}, \"httpMethod\": \"GET\"}}, \"descriptor\": {\"methods\": {\"TestAPI.ShowData2\": {\"response\": {\"$ref\": \"OutputResp\"}}, \"TestAPI.ShowData3\": {\"response\": {\"$ref\": \"OutputResp\"}}, \"TestAPI.ShowData4\": {\"request\": {\"$ref\": \"InputReq\"}, \"response\": {\"$ref\": \"OResp\"}}, \"TestAPI.Test\": {\"response\": {\"$ref\": \"OutputResp\"}}, \"TestAPI.LoadTestData\": {}, \"TestAPI.ShowData\": {\"response\": {\"$ref\": \"OutputResp\"}}}, \"schemas\": {\"ValueResp\": {\"type\": \"object\", \"id\": \"ValueResp\", \"properties\": {\"attrs\": {}, \"value\": {\"type\": \"string\"}}}, \"OResp\": {\"type\": \"object\", \"id\": \"OResp\", \"properties\": {\"entries\": {\"items\": {\"$ref\": \"ItemResp\"}, \"type\": \"array\"}}}, \"OutputResp\": {\"type\": \"object\", \"id\": \"OutputResp\", \"properties\": {\"text\": {\"type\": \"string\"}}}, \"InputReq\": {\"type\": \"object\", \"id\": \"InputReq\", \"properties\": {\"text\": {\"type\": \"string\"}}}, \"ItemResp\": {\"type\": \"object\", \"id\": \"ItemResp\", \"properties\": {\"values\": {\"items\": {\"$ref\": \"ValueResp\"}, \"type\": \"array\"}}}}}, \"version\": \"v1\", \"extends\": \"thirdParty.api\", \"defaultVersion\": true, \"root\": \"http://localhost:8082/_ah/api\", \"adapter\": {\"bns\": \"http://localhost:8082/_ah/spi\", \"type\": \"lily\"}, \"description\": \"test api\"}"]}
Response: {
 "error": {
  "errors": [
   {
    "domain": "global",
    "reason": "invalid",
    "message": "Invalid Value"
   }
  ],
  "code": 400,
  "message": "Invalid Value"
 }
}

ERROR    2015-12-15 17:54:25,706 discovery_service.py:141] Failed to get API directory
INFO     2015-12-15 17:54:25,706 module.py:787] default: "GET /_ah/api/discovery/v1/apis HTTP/1.1" 404 9

My app (localhost:8080) does not work either, with the same problem.

  • 写回答

2条回答 默认 最新

  • douhuan1950 2015-12-16 21:08
    关注

    I was passing a map in the response of a service, and it did not like that. Only slices and structs are allowed.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 程序不包含适用于入口点的静态Main方法
  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记