To add a collaborator to this project you will need to use the Relish gem to add the collaborator via a terminal command. Soon you'll be able to also add collaborators here!
More about adding a collaboratorRspec-api-documentation
http://github.com/zipmark/rspec_api_documentation
RSpec API Doc Generator
Generate pretty API docs for your Rails APIs.
Installation
Add rspec_api_documentation to your Gemfile
gem 'rspec_api_documentation'
Bundle it!
$> bundle install
Require it in your API tests
require "rspec_api_documentation"
require "rspec_api_documentation/dsl"
See the wiki for additional setup. Setting up RSpec API Documentation
Usage
resource "Account" do
get "/accounts" do
example "Get a list of all accounts" do
do_request
last_response.status.should be_ok
end
end
get "/accounts/:id" do
parameter :id, "Account ID"
let(:account) { Factory(:account) }
let(:id) { account.id }
example "Get an account", :document => :public do
do_request
last_response.status.should be_ok
end
end
end
Topics
- Document callbacks
- Example Request
- Generate HTML documentation from test examples
- Use OAuth2 MAC client as a test client
Last published over 3 years ago by samwgoldman.