GrapeDocumenter
This adds a task to Rails Applications to generate documentation for Grape APIs.
Installation
Add this line to your application's Gemfile:
gem 'grape_documenter'
And then execute:
$ bundle
Or install it yourself as:
$ gem install grape_documenter
Usage
Within the root of you Rails Application run the following rake task...
$ bundle exec grape_documenter 'MyApp::Api' '/path/to/docs' --format='html' --mounted-path='/api'
The first argument is the a string of the class of Grape::API. If you have multiple APIs within the same application you can run the task as many times as you like with different output paths.
Specifying output format
Currently 2 formats are supported: 'html'; 'textile'. The default is html. You can change the format as shown above.
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Added some feature'
) - Verify that all tests pass (
bundle exec fudge build
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request