<% if object.restful? && object.resource? %>
<% @meths.each do |meth| %>

<%= meth.name %>

<%= meth.docstring %>

<% if meth.tags(:url).size > 0 %>

URL

<%= meth.tag(:action).text %> <%= meth.tag(:url).text %>
<% end %> <%= yieldall(object: meth, item: :required, title: 'Required Parameters') %> <%= yieldall(object: meth, item: :optional, title: 'Optional Parameters') %> <% if meth.tags(:response).size > 0 %>

Response Object

  • <%= format_types(meth.tag(:response).types, false) %> <%= htmlify(meth.tag(:response).text) %>
<% else %> <%= yieldall(object: meth, item: :response_field, title: 'Response Fields') %> <% end %> <% if meth.tags(:raise).size > 0 %> <%= yieldall(object: meth, item: :raise, title: 'Errors') %> <% end %> <% if meth.tags(:example_request).size > 0 %>

Examples

<% meth.tags(:example_request).each_with_index do |example_request, i| %>
<% example_request_description = meth.tags(:example_request_description)[i] %> <% example_response = meth.tags(:example_response)[i] %> <% example_response_description = meth.tags(:example_response_description)[i] %> <% if example_request_description %> <% if example_request_description.text =~ /\n/im %> <%= htmlify(example_request_description.text) %> <% else %> <%= example_request_description.text %> <% end %> <% end %> Request <% if example_request %> <% if example_request.text =~ /\n/im %> <%= htmlify(example_request.text) %> <% else %> <%= example_request.text %> <% end %> <% end %> Response <% if example_response %> <% if example_response.text =~ /\n/im %> <%= htmlify(example_response.text) %> <% else %> <%= example_response.text %> <% end %> <% end %> <% if example_response_description %> <% if example_response_description.text =~ /\n/im %> <%= htmlify(example_response_description.text) %> <% else %> <%= example_response_description.text %> <% end %> <% end %>
<% end %>
<% end %>
<% end %>
<% end %>