No description or website provided.
Ruby HTML JavaScript CSS
Latest commit ca7c491 Dec 28, 2015 @fehguy fehguy Update README.md
Permalink
Failed to load latest commit information.
app Update endpoints May 5, 2015
bin initial build out May 7, 2014
config initial build out May 7, 2014
db pet endpoints May 28, 2014
lib initial build out May 7, 2014
log initial build out May 7, 2014
public initial build out May 7, 2014
test initial build out May 7, 2014
vendor/assets initial build out May 7, 2014
.DS_Store initial build out May 7, 2014
.gitignore Add RVM config files to .gitignore Jun 5, 2014
Gemfile Update Gemfile May 5, 2015
Gemfile.lock Update Gemfile May 5, 2015
README.md Update README.md Dec 28, 2015
README.rdoc initial build out May 7, 2014
Rakefile initial build out May 7, 2014
config.ru initial build out May 7, 2014

README.md

Swagger Sample App

Overview

This is a rails project to build a stand-alone server which implements the Swagger spec. You can find out more about both the spec and the framework at http://swagger.io. There is an online version of this server at http://petstore.swagger.io/api/api-docs

This project is using a fork of grape-swagger, generously written by Tim Vandecasteele. Once the changes to make it swagger-1.2 compatible are merged, the project will be updated to use that. Also many thanks to Kyle Ginavan and Craig Cottingham for putting this sample together, and updating the grape-swagger gem.

To run

To run the server, run this task:

bundle update
rake db:migrate
rails s

Note if you have trouble with bundle update, please make sure you have postgres installed--rails is expecting it, even though it's not using the database at all.

This will start rails on port 3000.

Testing the server

Once started, you can navigate to http://localhost:3000/api/api-docs to view the Swagger Resource Listing. This tells you that the server is up and ready to demonstrate Swagger.

Using the UI

There is an HTML5-based API tool available in a separate project. This lets you inspect the API using an intuitive UI. You can pull this code from here: https://github.com/swagger-api/swagger-ui

You can then open the dist/index.html file in any HTML5-enabled browser. Upen opening, enter the URL of your server in the top-centered input box. Click the "Explore" button and you should see the resources available on the server.