<table class='table table-bordered table-condensed' id='api-doc-table'>
  
  <tr class='info'>
    <th>Request</th>
    <td>
      <span class='label label-info'><%= action['method']%></span>
      <code><%= action['path']%></code>
    </td>
  </tr>
  
  <% if action['description'].present? %>
    <tr>
      <th>Description</th>
      <td><%= action['description']%></td>
    </tr>
  <% end %>
  
  <% if action['params'].is_a?(Hash) %>
    <tr>
      <th>Parameters</th>
      <td>
        <%= render :partial => 'request_params', :object => action['params'] %>
      </td>
    </tr>
  <% end %>
  
  <tr class='info'>
    <th>Response</th>
    <td>
      <span class='label <%= action['status'].to_s[0] == '4' ? 'label-important' : 'label-success' %>'>
        <%= action['status'] %>
      </span>
    </td>
  </tr>
  
  <tr>
    <th>Body</th>
    <td>
      <pre><%= JSON.pretty_generate(JSON.parse(action['body'])) rescue action['body']%></pre>
    </td>
  </tr>
  
</table>