Sha256: 67b3edba2af7bd3dca258d88a85f3a048a1d70d1f9354effa5e6f7cf1913cee1
Contents?: true
Size: 1.27 KB
Versions: 2
Compression:
Stored size: 1.27 KB
Contents
<% responses = endpoint.responses.select do |response| next false unless response.success? next false unless response.content true end return unless responses.size.positive? %> <h4>Responses</h4> <% responses.each do |response| %> <% id = SecureRandom.hex %> <div class="Vlt-accordion--chevron-left"> <div role="button" style="padding: 12px;" class="response-description-toggle Vlt-bg-<%= response.code[0] == "2" ? 'green' : 'red' %> Vlt-accordion__trigger Vlt-js-accordion__trigger Nxd-accordion-button" data-accordion="acc<%= id %>"> <strong><%= response.code %></strong> <%= response.description %> </div> <div id="acc<%= id %>" class="Vlt-js-accordion__content <%= @specification.auto_expand_responses ? 'Vlt-js-accordion__content_open' : '' %>"> <% 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> </div> <% end %>
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
nexmo-oas-renderer-2.0.1 | lib/nexmo/oas/renderer/views/open_api/_response_descriptions.erb |
nexmo-oas-renderer-2.0.0 | lib/nexmo/oas/renderer/views/open_api/_response_descriptions.erb |