Sha256: 182f587abc605318bf41d9f19110f4875429bdc4f971a69ba77c1968321ab0c8

Contents?: true

Size: 1.42 KB

Versions: 14

Compression:

Stored size: 1.42 KB

Contents

<div class="Vlt-grid <% if !group['schema'] %> Nxd-api--noborder Vlt-article--reverse<% end %>">
  <div class="Vlt-col Vlt-col--2of3 Nxd-api__docs">
    <div>
      <h1 id="<%= group['name'].parameterize %>" class='Vlt-grey-dark'><%= group['name'] %></h1>
      <p class: "Vlt-grey-darker"><%= group['description'] %></p>

      <% if group['schema'] %>
        <% group['schema'].each do |format, schema| %>
          <div class="js-format" data-format="<%= format %>">
            <%
              if schema['properties']
                properties = schema['properties']
              elsif schema['allOf']
                properties = schema['allOf'].map { |o| o['properties'] }.reduce(&:merge)
              end

              properties = properties.map do |name, definition|
                OasParser::Property.new(self, schema, name, definition)
              end
            %>

            <%= erb :'open_api/_parameters', locals: { parameters: properties, model: true, format: format  } %>
          </div>
        <% end %>
      <% end %>
    </div>
  </div>
  <div class="Vlt-col Vlt-col--1of3 Nxd-api__code">
    <% if group['schema'] %>
      <% group['schema'].each do |format, schema| %>
        <div class="js-format" data-format="<%= format %>">
          <h5>Example Model</h5>
          <%= ResponseParserDecorator.new(schema).html(format, xml_options: schema['xml']) %>
        </div>
      <% end %>
    <% end %>
  </div>
</div>

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/_model.erb
nexmo-oas-renderer-0.3.6 lib/nexmo/oas/renderer/views/open_api/_model.erb
nexmo-oas-renderer-0.3.5 lib/nexmo/oas/renderer/views/open_api/_model.erb
nexmo-oas-renderer-0.3.4 lib/nexmo/oas/renderer/views/open_api/_model.erb
nexmo-oas-renderer-0.3.3 lib/nexmo/oas/renderer/views/open_api/_model.erb
nexmo-oas-renderer-0.3.2 lib/nexmo/oas/renderer/views/open_api/_model.erb
nexmo-oas-renderer-0.3.1 lib/nexmo/oas/renderer/views/open_api/_model.erb
nexmo-oas-renderer-0.3.0 lib/nexmo/oas/renderer/views/open_api/_model.erb
nexmo-oas-renderer-0.2.2 lib/nexmo/oas/renderer/views/open_api/_model.erb
nexmo-oas-renderer-0.2.1 lib/nexmo/oas/renderer/views/open_api/_model.erb
nexmo-oas-renderer-0.2.0 lib/nexmo/oas/renderer/views/open_api/_model.erb
nexmo-oas-renderer-0.1.2 lib/nexmo/oas/renderer/views/open_api/_model.erb
nexmo-oas-renderer-0.1.1 lib/nexmo/oas/renderer/views/open_api/_model.erb
nexmo-oas-renderer-0.1.0 lib/nexmo/oas/renderer/views/open_api/_model.erb