-2

私のhttps://xy/api/swagger_doc.jsonはこれを返します:

{"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 を指している必要があります。このため、swagger ui で次のエラーが表示されます。

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

ping.json フォームhttps://xy:443/api/swagger_doc/ping.jsonに手動でアクセスできます。コンテンツは、swagger 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"}

この謎を解決するためのアイデアをいただければ幸いです。

4

1 に答える 1

0

はぁ…大変でしたね。

それはぶどうを闊歩するバグでした:

ぶどう闊歩で(0.7.2)

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

グレープ・スワッガー (0.8.0)

path: "/#{local_route}#{url_format}",
于 2014-09-11T08:08:39.353 に答える