Skip to content

Action Documentation

drinor edited this page Mar 26, 2013 · 11 revisions

For get action documentation you need add an action block to resource controller:

# =begin action
# =end

Documentation blocks use yaml format.

Params

  • method
  • action
  • authentication_required
  • response_formats
  • description
  • http_responses
  • params
  • errors

method

  • Type: String
  • Description: method for access to acction
  • Values: the most common are: GET, POST, PUT and DELETE
  • Required: true

action

  • Type: String
  • Description: action called for this method + url
  • Values: the most common are: index, show, create, update and destroy
  • Required: true

authentication_required

  • Type: Boolean
  • Description: indicates if this action requires authentication
  • Values: [true, false]
  • Required: false

If you don't add this paramether, rapidoc use default value (true). For change default value see: configuration

response_formats

  • Type: String
  • Description: types of formats that your API support
  • Values: the most commont are: json, xml and html
  • Required: false

description

  • Type: String
  • Description: action description
  • Required: false

Example

For complete example see the user tests controller: complete example

Clone this wiki locally