2014-09-10 28 views
-2

https://x.y/api/swagger_doc.json返回此:swagger_doc.json返回错误招摇文档的URL

{"apiVersion":"0.1","swaggerVersion":"1.2","produces":["application/xml","application/json","application/vnd.api+json","text/plain"],"apis":[{"path":"/ping.{format}","description":"Operations about pings"},{"path":"/ping_dev.{format}" 

注意,路径指向/ping.{format}它应指向/swagger_doc/ping.json。正因为如此招摇UI给我这个错误:

Unable to read api 'friends' from path https://x.y:443/api/ping.json 

我可以访问手动ping.json形式https://x.y:443/api/swagger_doc/ping.json。 的内容是什么会被招摇UI需要:

{"apiVersion":"0.1","swaggerVersion":"1.2","resourcePath":"/ping","produces":["application/xml","application/json","application/vnd.api+json","text/plain"],"apis":[{"path":"/api/ping.{format}","operations":[{"notes":"","summary":"Returns pong.","nickname":"GET-api-ping---format-","method":"GET","parameters":[],"type":"void"}]}],"basePath":"http://local.dime.com:3000"} 

任何想法,将不胜感激,以解开这个谜:

回答

0

嗯..这是一个艰难的一个。

这是一个葡萄招摇虫:

在葡萄招摇

(0.7.2)

:path => "#{url_base}/#{local_route}#{url_format}", 

在葡萄招摇(0.8.0)

path: "/#{local_route}#{url_format}",