Generate Swagger docs from your specs
Add this line to your application's Gemfile:
gem 'rspec-swagger'
And then execute:
$ bundle
Or install it yourself as:
$ gem install rspec-swagger
Place your Swagger documentation in docs/swagger.json and docs/*.json. Then, drop the following in a test file in your test suite:
require 'spec_helper'
describe Rspec::Swagger do
include Rspec::Swagger::TestHelpers
it "should describe the api" do
test_api_correctness
end
end
This gem is designed for use with rack-swagger.
- Fork it ( https://github.com/[my-github-username]/rspec-swagger/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request