Sage/grape_documenter — pull request #8 by tomkadwill (2014-06-05 11:11:49+00:00)
Title: KYAN - Added ability to specify a custom route name

Whilst using the grape_documenter to document some new API endpoints we found that it did not work correctly for some custom routes. This patch allows you to modify the result of `inferred_rails_action` by added a hash like `:action => 'custom_route'` alongside the params hash, passed in with the endpoint description. Eg:

desc 'Creates a new ledger account', {
:params => {
'ledger_account[included_in_chart]' => {
:type => 'boolean',
:desc => 'Boolean that marks the Ledger Account as included.'
}
},
:action => 'custom_action'
}

If no action hash is specified then original behaviour is unaffected.