Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

suffix with json not work, with add_swagger_documentation default option. #244

Closed
TangMonk opened this issue Apr 8, 2015 · 2 comments
Closed

Comments

@TangMonk
Copy link

TangMonk commented Apr 8, 2015

in project grape-swagger-0.10.1/example folder:

$ ls
api.rb      config.ru   splines.png

$ rackup config.ru
/Users/tangmonk/.rvm/gems/ruby-2.1.5/gems/grape-swagger-0.10.1/example/api.rb:4: warning: class variable access from toplevel
Thin web server (v1.6.3 codename Protein Powder)
Maximum connections set to 1024
Listening on localhost:9292, CTRL+C to stop

$ curl http://localhost:9292/swagger_doc/swagger_doc.json
Not Found

$ curl http://localhost:9292/swagger_doc/swagger_doc

{"apiVersion":"0.1","swaggerVersion":"1.2","resourcePath":"/swagger_doc","produces":["application/json"],"apis":[{"path":"/swagger_doc","operations":[{"notes":"","summary":"Swagger compatible API description","nickname":"GET-swagger_doc","method":"GET","parameters":[],"type":"void"}]},{"path":"/swagger_doc/{name}","operations":[{"notes":"","summary":"Swagger compatible API description for specific API","nickname":"GET-swagger_doc--name","method":"GET","parameters":[{"paramType":"path","name":"name","description":"Resource name of mounted API","type":"string","required":true,"allowMultiple":false}],"type":"void"}]}],"basePath":"http://localhost:9292"}%

If I add theformat: :json to add_swagger_documentation it will works with swagger-ui.

@dblock
Copy link
Member

dblock commented Apr 8, 2015

This is by design, but has been causing a lot of issues, see ruby-grape/grape#914. Can you please PR the fix for this repo for the demo?

@LeFnord
Copy link
Member

LeFnord commented Jan 14, 2017

solved in the actual version

@LeFnord LeFnord closed this as completed Jan 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants