<commit_before><h1><%= @info.app.name.titleize %> REST API Reference documentation</h1>

<h2>Routes index</h2>

<ul>
<% @info.routes.sort.each do |route| %>
  <li><%= route.spec %></li>
<% end %>
</ul>

<h2>Table of content</h2>

<ul>
<% @info.toc.keys.sort.each do |controller_name| %>
  <li>
    <%= controller_name.titleize %>
    <ul>
      <% @info.toc[controller_name].keys.sort.each do |action_name| %>
      <li><%= action_name.titleize %></li>
      <% end %>
    </ul>
  </li>
<% end %>
</ul>

<h2>Schema</h2>

<% @info.toc.keys.sort.each do |controller_name| %>
<% @info.toc[controller_name].keys.sort.each do |action_name| %>

<% route = @info.toc[controller_name][action_name] %>
<% schema = route.schema %>

<h3><%= controller_name.titleize %> > <%= action_name.titleize %></h3>

<h4>Route</h4>
<%= route.spec %>

<% if schema.request_schema %>
  <h4>Request schema</h4>
  <pre><code>
<%= schema.request_schema.params %>
  </pre></code>
<% end %>

<% end %>
<% end %>
<commit_msg>List response schemas in documentation.<commit_after><h1><%= @info.app.name.titleize %> REST API Reference documentation</h1>

<h2>Routes index</h2>

<ul>
<% @info.routes.sort.each do |route| %>
  <li><%= route.spec %></li>
<% end %>
</ul>

<h2>Table of content</h2>

<ul>
<% @info.toc.keys.sort.each do |controller_name| %>
  <li>
    <%= controller_name.titleize %>
    <ul>
      <% @info.toc[controller_name].keys.sort.each do |action_name| %>
      <li><%= action_name.titleize %></li>
      <% end %>
    </ul>
  </li>
<% end %>
</ul>

<h2>Schema</h2>

<% @info.toc.keys.sort.each do |controller_name| %>
<% @info.toc[controller_name].keys.sort.each do |action_name| %>

<% route = @info.toc[controller_name][action_name] %>
<% schema = route.schema %>

<h3><%= controller_name.titleize %> > <%= action_name.titleize %></h3>

<h4>Route</h4>
<%= route.spec %>

<% if schema.request_schema %>
  <h4>Request schema</h4>
  <pre><code>
<%= schema.request_schema.params %>
  </pre></code>
<% end %>

<h4>Response schema</h4>
<% schema.response_schemas.each do |status, response_schema| %>
  <h5><%= response_schema.status %> [<%= response_schema.http_status %>]</h5>
  <pre><code>
<%= response_schema.body %>
  </pre></code>
<% end %>

<% end %>
<% end %>

{'fraction_non_alphanumeric': 0.2328888888888889, 'fraction_numerical': 0.014222222222222223, 'mean_word_length': 3.93640350877193, 'pattern_counts': {'":': 0, '<': 120, '<?xml version=': 0, '>': 122, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3009161', 'n_tokens_mistral': 983, 'n_tokens_neox': 876, 'n_words': 148}