templates/lib/tasks/doc_generator/template.erb in wd_sinatra-0.2.1 vs templates/lib/tasks/doc_generator/template.erb in wd_sinatra-0.2.2

- old
+ new

@@ -66,9 +66,16 @@ <h2><%= api.verb.upcase %> <%= '[SSL]' if api.ssl %> /<%= api.url %></h2> <% if api.auth_required %> <span class='label important'>Authentication required</span> <% end %> <%= "<p>#{api.doc.desc}</p>" if api.doc.desc %> + <% unless api.doc.examples.empty? %> + <ul> + <% api.doc.examples.each do |example| %> + <li><code><%= example %></code></li> + <% end %> + </ul> + <% end %> <%# TODO support for namespaced params %> <% [["Required", :required_rules], ["Optional", :optional_rules]].each do |label,rule_meth| %> <% unless api.send(rule_meth).empty? %> <h3><%= label %> Params</h3> <ul>