Sha256: e909e7a3e872d5d9cf8f4e0a3d8c63699e82dc72197cae63798a58142a9469b0

Contents?: true

Size: 1.44 KB

Versions: 7

Compression:

Stored size: 1.44 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>
      <h2 id="<%= group['name'].parameterize %>" class='Vlt-grey-dark'><%= group['name'] %></h2>
      <p class: "Vlt-grey-darker"><%= group['description']&.render_markdown %></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

7 entries across 7 versions & 1 rubygems

Version Path
nexmo-oas-renderer-0.11.3 lib/nexmo/oas/renderer/views/open_api/_model.erb
nexmo-oas-renderer-0.11.2 lib/nexmo/oas/renderer/views/open_api/_model.erb
nexmo-oas-renderer-0.11.1 lib/nexmo/oas/renderer/views/open_api/_model.erb
nexmo-oas-renderer-0.11.0 lib/nexmo/oas/renderer/views/open_api/_model.erb
nexmo-oas-renderer-0.10.0 lib/nexmo/oas/renderer/views/open_api/_model.erb
nexmo-oas-renderer-0.9.0 lib/nexmo/oas/renderer/views/open_api/_model.erb
nexmo-oas-renderer-0.8.0 lib/nexmo/oas/renderer/views/open_api/_model.erb