lib/grape-apiary/templates/blueprint.md.erb
FORMAT: 1A
HOST: <%= host %>
# <%= name %>
<%= description %>
<% resources.each do |resource| %>
# Group <%= resource.title %>
<%= properties_table(resource) %>
<% resource.namespaced.each do |grouped_resource| %>
<% grouped_resource.paths.each do |resource_by_path| %>
## <%= resource_by_path.header %>
Actions on the <%= resource.name %> resource
<% if resource_by_path.routes.first.params.present? %>
+ Parameters
<% resource_by_path.routes.first.params.each do |param| %>
+ <%= param.description %>
<% end %>
<% end %>
<% resource_by_path.routes.each do |route| %>
### <%= route.description %>
<% if show_request_sample?(route) %>
<%= route.request_description %>
<%= formatted_request_headers %>
+ Body
<%= resource.sample_request %>
<% end %>
<%= route.response_description %>
<%= formatted_response_headers %>
+ Body
<%= resource.sample_response(route) %>
<% end %>
<% end %>
<% end %>
<% end %>