ruby on rails - swagger_doc.json returns wrong swagger doc urls -
my https://x.y/api/swagger_doc.json returns this:
{"apiversion":"0.1","swaggerversion":"1.2","produces":["application/xml","application/json","application/vnd.api+json","text/plain"],"apis":[{"path":"/ping.{format}","description":"operations pings"},{"path":"/ping_dev.{format}"
notice path pointing /ping.{format} should point /swagger_doc/ping.json. because of swagger ui gives me error:
unable read api 'friends' path https://x.y:443/api/ping.json
i can access manually ping.json form https://x.y:443/api/swagger_doc/ping.json. content needed 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"}
any idea appreciated solve mystery:
huh.. tough one.
it grape-swagger bug:
in grape-swagger (0.7.2)
:path => "#{url_base}/#{local_route}#{url_format}",
in grape-swagger (0.8.0)
path: "/#{local_route}#{url_format}",
Comments
Post a Comment