grape-apidoc
Rake task to generate Markdown documentation for Grape/Grape::Entity-based APIs
Getting started
# Gemfile
group :development do # most common use env is env=development
gem 'grape-apidoc'
end
# Rakefile
begin
require 'grape/apidoc'
Grape::Apidoc::RakeTask.new(:apidoc, root_api_class: Grape::App) # point it to the top-level API class
rescue LoadError
nil # so it does not fail in non-development environment
end
Examples
- API: spec/scenario/example.rb
- Resulting doc: spec/fixtures/example.md