My favorites | Sign in
Project Logo
Project hosting will be READ-ONLY Wednesday at 8am PST due to brief network maintenance.
                
Code license: MIT License
Labels: rest, rails, api, documentation, generator
Feeds:
People details
Project owners:
  jaapvandermeer

RAPIDoc

RAPIDoc is a controller generator for your Rails Restful API. It generates a API controller, by simply invoking... ./generate It parses the controllers you specify, and generates a ApiController with appropriate views for it. This makes it very easy to document your Rest API. For methods you use, and according to ERB templates it generates the view for you.

EXAMPLE Class documentation

=begin apidoc
name:: /projects
json:: <%=Project.find(:first).to_json %>
xml:: <%=Project.find(:first).to_xml %>

This resource can be used to show edit and list projects. A project is a one floorplanner. A project
has multiple floors, which can contain multiple designs. 
=end

EXAMPLE Method documentation

=begin apidoc
url:: /projects
method:: GET
access:: FREE
return:: [JSON|XML] - some project  
param:: page:int - the page
param:: per_page:int - max items per page

Get a list of projects. This method uses pagination. If you want to retreive project 1-10 for example:
/projects?page=1&per_page=10.
=end

For more information: http://www.suite75.net/blog/dev/rapidoc-rails-rest-api-documentation-generation-well-just-rapidoc.html









Hosted by Google Code