fotinakis/swagger-blocks

Sinatra support and documentation.

jmolina4 opened this issue · 2 comments

PLEASE READ THIS BEFORE FILING AN ISSUE:

https://github.com/fotinakis/swagger-blocks/#filing-issues

Hi,

In the Readme you say that you support any Ruby framework but there's only documentation for Rails. Is there any documentation example with a Sinatra app?

Thanks,

I am also interested in this!

For Sinatra, the configuration is exactly the same.
The only thing you need to do is just add the route, like:

  get 'api_docs' do
    json Swagger::Blocks.build_root_json(SWAGGERED_CLASSES)
  end