Sha256: e0b78c45e886ebf85bfccaa30f5a2527039c827d05712422e7328daf68f9037f

Contents?: true

Size: 914 Bytes

Versions: 12

Compression:

Stored size: 914 Bytes

Contents

<h3 id="<%= id = 'schema-' + title; id.parameterize %>"><%= title %></h3>
<%= render_markdown(schema.description) %>
<% if properties.any? %>
<table class='<%= id.parameterize %>'>
<thead>
<tr><th>Name</th><th>Type</th><th>Required</th><th>Description</th><th>Schema</th></tr>
</thead>
<tbody>
<% properties.each do |property_name, property_attributes| %>
<tr>
<td><%= property_name %></td>
<td><%= property_attributes.type %></td>
<td><%= schema.requires?(property_name) %></td>
<td><%= render_markdown(property_attributes.description) %></td>
<td>
  <%=
  linked_schema = property_attributes
  # If property is an array, check the items property for a reference.
  if property_attributes.type == 'array'
    linked_schema = property_attributes['items']
  end
  # Only print a link if it's a named schema
  get_schema_link(linked_schema) if linked_schema.name %>
</td>
</tr>
<% end %>
</tbody>
</table>
<% end %>

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
govuk_tech_docs-4.1.1 lib/govuk_tech_docs/api_reference/templates/schema.html.erb
govuk_tech_docs-4.1.0 lib/govuk_tech_docs/api_reference/templates/schema.html.erb
govuk_tech_docs-4.0.0 lib/govuk_tech_docs/api_reference/templates/schema.html.erb
govuk_tech_docs-3.5.0 lib/govuk_tech_docs/api_reference/templates/schema.html.erb
govuk_tech_docs-3.4.5 lib/govuk_tech_docs/api_reference/templates/schema.html.erb
govuk_tech_docs-3.4.0 lib/govuk_tech_docs/api_reference/templates/schema.html.erb
govuk_tech_docs-3.3.1 lib/govuk_tech_docs/api_reference/templates/schema.html.erb
govuk_tech_docs-3.3.0 lib/govuk_tech_docs/api_reference/templates/schema.html.erb
govuk_tech_docs-3.2.1 lib/govuk_tech_docs/api_reference/templates/schema.html.erb
govuk_tech_docs-3.2.0 lib/govuk_tech_docs/api_reference/templates/schema.html.erb
govuk_tech_docs-3.1.0 lib/govuk_tech_docs/api_reference/templates/schema.html.erb
govuk_tech_docs-3.0.1 lib/govuk_tech_docs/api_reference/templates/schema.html.erb