Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Ruby
branch: inprogress

This branch is 13 commits ahead, 1 commit behind sabman:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
rapidoc_sample
templates
test
.gitignore
.rvmrc
Gemfile
Gemfile.lock
LICENSE.txt
README
Rakefile
VERSION
init.rb
install.rb
uninstall.rb

README

@WIP
Based on RAPI Doc by Jaap van der Meer found here: http://code.google.com/p/rapidoc/

Rails API Doc Generator
Original Author: JPM van der Meer
Modified By: Chelsea Robb
=======================
With API DOC one can generate code for a Restful Rails API.
It generates a set of HTML views in the public directory.  Parses the desired controllers and generates appropriate views.
Currently does not read routes.rb and requires manual entry of routes

=INSTALL
    gem install rapi_doc

==Layout files
You can find documentation layouts in config/rapi_doc

index.html.erb is used for index page.
resource.html.erb is used for individual controllers.

==Usage
Run 'rake rapi_doc' to generate config and layout files. (TODO: Add a separte rake task to generate config files)
Modify config file by adding your controllers, e.g.:

users:
  location: "/users"
  controller_name: "users_controller.rb"

Then invoke the generation by calling:
    rake rapi_doc

==Documentation Example

=begin apidoc
url:: /users
method:: GET
access:: FREE
return:: [JSON|XML] - list of user objects
param:: page:int - the page, default is 1
param:: per_page:int - max items per page, default is 10

Get a list of all users in the system with pagination.  Defaults to 10 per page
=end

Something went wrong with that request. Please try again.