2015-06-18 18:11:08 +00:00
|
|
|
# Swagger for Sinatra
|
|
|
|
|
|
|
|
## Overview
|
|
|
|
This is a project to provide Swagger support inside the [Sinatra](http://www.sinatrarb.com/) framework. You can find
|
2015-06-18 18:32:50 +00:00
|
|
|
out more about both the spec and the framework at http://swagger.io. For more information about
|
2015-06-18 18:11:08 +00:00
|
|
|
Wordnik's APIs, please visit http://developer.wordnik.com.
|
|
|
|
|
|
|
|
## Prerequisites
|
|
|
|
You need to install ruby 1.9.3 and the following gems:
|
|
|
|
|
|
|
|
```
|
|
|
|
sinatra
|
|
|
|
sinatra-cross_origin
|
|
|
|
```
|
|
|
|
|
|
|
|
## Getting started
|
2015-06-18 18:32:50 +00:00
|
|
|
This sample was generated with the [swagger-codegen](https://github.com/swagger-api/swagger-codegen) project.
|
2015-06-18 18:11:08 +00:00
|
|
|
|
|
|
|
```
|
|
|
|
rackup -p 4567 config.ru
|
|
|
|
```
|
|
|
|
|
2015-06-18 18:32:50 +00:00
|
|
|
In your [swagger ui](https://github.com/swagger-api/swagger-ui), put in the following URL:
|
2015-06-18 18:11:08 +00:00
|
|
|
|
|
|
|
```
|
|
|
|
http://localhost:4567/resources.json
|
|
|
|
```
|
|
|
|
|
|
|
|
Voila!
|