forked from loafle/openapi-generator-original
* Rename templateDir: rails5 -> ruby-on-rails-server * Rename script: rails5-petstore-server.sh -> ruby-on-rails-server-petstore.sh * Rename sample folder: rails5 -> ruby-on-rails * Rename script(openapi3): rails5-petstore-server.sh -> ruby-on-rails-server-petstore.sh * Update ruby-on-rails-server-petstore.sh * Rename templateDir: sinatra -> ruby-sinatra-server * Rename script: sinatra-petstore-server.sh -> ruby-sinatra-server-petstore.sh * Rename sample folder: sinatra -> ruby-sinatra * Update script * Rename templateDir: ruby -> ruby-client * Rename script: ruby-petstore.sh -> ruby-client-petstore.sh * Update scripts * Update samples - bin/ruby-sinatra-server-petstore.sh - bin/ruby-on-rails-server-petstore.sh - bin/ruby-client-petstore.sh - bin/security/ruby-client-petstore.sh
30 lines
736 B
Markdown
30 lines
736 B
Markdown
# Swagger for Sinatra
|
|
|
|
## Overview
|
|
This is a project to provide Swagger support inside the [Sinatra](http://www.sinatrarb.com/) framework. You can find
|
|
out more about both the spec and the framework at http://swagger.io. For more information about
|
|
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
|
|
This sample was generated with the [OpenAPI Generator](https://github.com/openapitools/openapi-generator) project.
|
|
|
|
```
|
|
rackup -p 4567 config.ru
|
|
```
|
|
|
|
In your [swagger ui](https://github.com/swagger-api/swagger-ui), put in the following URL:
|
|
|
|
```
|
|
http://localhost:4567/resources.json
|
|
```
|
|
|
|
Voila!
|