Autodoc::Grape

Extend r7kamura/autodoc to generate documention for Grape API.

Installation

Add this line to your application's Gemfile:

gem 'autodoc-grape'

Example

Grape API params block

params do
  requires :id, type: Integer
  optional :hash, type: Hash do
    requires :attr, type: String
  end
end

Generated Parameter Section

### Parameters
* id Integer (required)
* hash Hash
 * attr String (required)

Supported Parameter Options

The following are all valid options.

  • required
  • values
  • default
  • description