Sha256: 3e6c58e039510f726157395b28e04d5efb06842c4f224e70bf19ec4cc561f145

Contents?: true

Size: 1.18 KB

Versions: 13

Compression:

Stored size: 1.18 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="response-description-toggle Vlt-btn Vlt-btn--tertiary Vlt-btn--block">
        <%= @specification.auto_expand_responses ? 'Hide' : 'View' %> response field descriptions
      </span>
    </a>
  </p>

  <div id="acc<%= id %>" class="Vlt-js-accordion__content <%= @specification.auto_expand_responses ? 'Vlt-js-accordion__content_open' : '' %>">
    <h4>Response Fields</h4>
    <% response.formats.each_with_index do |format, index| %>
      <% if response.exhibits_one_of_multiple_schemas?(format) %>
        <%= erb :'open_api/_response_tabs', locals: { endpoint: endpoint, format: format, response: response, content: :descriptions } %>
      <% else %>
        <% schema = response.schema(format) %>
        <%= erb :'open_api/_response_fields', locals: { endpoint: endpoint, schema: schema, format: format, index: nil } %>
      <% end %>
    <% end %>
  </div>
<% end %>

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
nexmo-oas-renderer-0.8.0 lib/nexmo/oas/renderer/views/open_api/_response_descriptions.erb
nexmo-oas-renderer-0.7.1 lib/nexmo/oas/renderer/views/open_api/_response_descriptions.erb
nexmo-oas-renderer-0.7.0 lib/nexmo/oas/renderer/views/open_api/_response_descriptions.erb
nexmo-oas-renderer-0.6.6 lib/nexmo/oas/renderer/views/open_api/_response_descriptions.erb
nexmo-oas-renderer-0.6.5 lib/nexmo/oas/renderer/views/open_api/_response_descriptions.erb
nexmo-oas-renderer-0.6.4 lib/nexmo/oas/renderer/views/open_api/_response_descriptions.erb
nexmo-oas-renderer-0.6.3 lib/nexmo/oas/renderer/views/open_api/_response_descriptions.erb
nexmo-oas-renderer-0.6.2 lib/nexmo/oas/renderer/views/open_api/_response_descriptions.erb
nexmo-oas-renderer-0.6.1 lib/nexmo/oas/renderer/views/open_api/_response_descriptions.erb
nexmo-oas-renderer-0.5.6 lib/nexmo/oas/renderer/views/open_api/_response_descriptions.erb
nexmo-oas-renderer-0.5.5 lib/nexmo/oas/renderer/views/open_api/_response_descriptions.erb
nexmo-oas-renderer-0.5.4 lib/nexmo/oas/renderer/views/open_api/_response_descriptions.erb
nexmo-oas-renderer-0.5.2 lib/nexmo/oas/renderer/views/open_api/_response_descriptions.erb