# 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

## Usage

    resource "Account" do
      let(:app) { Rails.application }

      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
        let(:account) { Factory(:account) }
        let(:id) { account.id }

        example "Get an account" do
          do_request
          last_response.status.should be_ok
        end
      end
    end

# 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


## Configuration options
- docs_dir - Output folder
- format - Output format
- template_path - Location of templates
- filter - Filter by example document type
- exclusion_filter - Filter by example document type

### Example Configuration
`spec/spec_helper.rb`

    RspecApiDocumentation.configure do |config|
      config.docs_dir = Rails.root.join("app", "views", "pages")

      config.define_group :public do |config|
        config.docs_dir = Rails.root.join("public", "docs")
      end
    end

## Usage

    resource "Account" do
      let(:app) { Rails.application }

      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
        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


Update readme for new configuration
Update readme for new configuration
