Sha256: 0513ee50a986f6d29847485fd606ca327d72f6d7e7d5eac56abcd9567954d22b

Contents?: true

Size: 1.58 KB

Versions: 14

Compression:

Stored size: 1.58 KB

Contents

<% endpoint.responses.each do |response| %>
  <% next unless response.success? %>
  <% next if response.code.to_i == 204 %>
  <% next unless response.content %>
  <% id = SecureRandom.hex %>
  <p class="collapsible">
    <a class="Vlt-js-accordion__trigger Nxd-accordion-button" data-accordion="acc<%= id %>">
      <span class="Vlt-btn Vlt-btn--tertiary Vlt-btn--block">
        View response field descriptions
      </span>
    </a>
  </p>

  <div id="acc<%= id %>" class="Vlt-js-accordion__content <%= auto_expand_responses ? 'Vlt-js-accordion__content_open' : '' %>">
    <h4 id="<%= anchor_prefix %>">Response Fields</h4>
    <% response.formats.each_with_index do |format, index| %>
      <div class="js-format" data-format="<%= format %>">
        <div class="Vlt-table">
          <table>
            <thead>
              <tr>
                <th>Field</th>
                <th>Description</th>
              </tr>
            </thead>
            <tbody>
              <% if response.exhibits_one_of_multiple_schemas?(format) %>
                <% response.split_schemas(format).each_with_index do |schema, index| %>
                  <%= erb :'open_api/_response_description_parameters', locals: { schema: schema, anchor_prefix: anchor_prefix } %>
                <% end %>
              <% else %>
                <% schema = response.schema(format) %>
                <%= erb :'open_api/_response_description_parameters', locals: { schema: schema, anchor_prefix: anchor_prefix } %>
              <% end %>
            </tbody>
          </table>
        </div>
      </div>
    <% end %>
  </div>
<% end %>

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
nexmo-oas-renderer-0.3.7 lib/nexmo/oas/renderer/views/open_api/_response_descriptions.erb
nexmo-oas-renderer-0.3.6 lib/nexmo/oas/renderer/views/open_api/_response_descriptions.erb
nexmo-oas-renderer-0.3.5 lib/nexmo/oas/renderer/views/open_api/_response_descriptions.erb
nexmo-oas-renderer-0.3.4 lib/nexmo/oas/renderer/views/open_api/_response_descriptions.erb
nexmo-oas-renderer-0.3.3 lib/nexmo/oas/renderer/views/open_api/_response_descriptions.erb
nexmo-oas-renderer-0.3.2 lib/nexmo/oas/renderer/views/open_api/_response_descriptions.erb
nexmo-oas-renderer-0.3.1 lib/nexmo/oas/renderer/views/open_api/_response_descriptions.erb
nexmo-oas-renderer-0.3.0 lib/nexmo/oas/renderer/views/open_api/_response_descriptions.erb
nexmo-oas-renderer-0.2.2 lib/nexmo/oas/renderer/views/open_api/_response_descriptions.erb
nexmo-oas-renderer-0.2.1 lib/nexmo/oas/renderer/views/open_api/_response_descriptions.erb
nexmo-oas-renderer-0.2.0 lib/nexmo/oas/renderer/views/open_api/_response_descriptions.erb
nexmo-oas-renderer-0.1.2 lib/nexmo/oas/renderer/views/open_api/_response_descriptions.erb
nexmo-oas-renderer-0.1.1 lib/nexmo/oas/renderer/views/open_api/_response_descriptions.erb
nexmo-oas-renderer-0.1.0 lib/nexmo/oas/renderer/views/open_api/_response_descriptions.erb