2014-09-10 57 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}",