Sha256: 34a2a321d14cf3f6ea0e56495c170b7eeb3b560293bc210905001548a979ddd4

Contents?: true

Size: 906 Bytes

Versions: 34

Compression:

Stored size: 906 Bytes

Contents

<h3 id="<%= id = 'schema-' + title; id.parameterize %>"><%= title %></h3>
<%= markdown(schema.description) %>
<% if properties.any? %>
<table>
<thead>
<tr><th>Name</th><th>Type</th><th>Required</th><th>Description</th><th>Schema</th></tr>
</thead>
<tbody>
<% properties.each do |property| %>
<tr>
<td><%= property[0] %></td>
<td><%= property[1].type %></td>
<td><%= property[1].required.present? %></td>
<td><%= markdown(property[1].description) %></td>
<td>
  <%=
  schema = property[1]
  # If property is an array, check the items property for a reference.
  if property[1].type == 'array'
    schema = property[1]['items']
  end
  # Only print a link if it's a referenced object.
  get_schema_link(schema) if schema.node_context.referenced_by.to_s.include? '#/components/schemas' and !schema.node_context.source_location.to_s.include? '/properties/' %>
</td>
</tr>
<% end %>
</tbody>
</table>
<% end %>

Version data entries

34 entries across 34 versions & 2 rubygems

Version Path
govuk_tech_docs-2.2.0 lib/govuk_tech_docs/api_reference/templates/schema.html.erb
govuk_tech_docs-2.1.1 lib/govuk_tech_docs/api_reference/templates/schema.html.erb
govuk_tech_docs-2.1.0 lib/govuk_tech_docs/api_reference/templates/schema.html.erb
govuk_tech_docs-2.0.13 lib/govuk_tech_docs/api_reference/templates/schema.html.erb
govuk_tech_docs-2.0.12 lib/govuk_tech_docs/api_reference/templates/schema.html.erb
govuk_tech_docs-2.0.11 lib/govuk_tech_docs/api_reference/templates/schema.html.erb
govuk_tech_docs-2.0.10 lib/govuk_tech_docs/api_reference/templates/schema.html.erb
govuk_tech_docs-2.0.9 lib/govuk_tech_docs/api_reference/templates/schema.html.erb
govuk_tech_docs-2.0.8 lib/govuk_tech_docs/api_reference/templates/schema.html.erb
govuk_tech_docs-2.0.7 lib/govuk_tech_docs/api_reference/templates/schema.html.erb
govuk_tech_docs-2.0.6 lib/govuk_tech_docs/api_reference/templates/schema.html.erb
govuk_tech_docs-2.0.5 lib/govuk_tech_docs/api_reference/templates/schema.html.erb
govuk_tech_docs-2.0.4 lib/govuk_tech_docs/api_reference/templates/schema.html.erb
govuk_tech_docs-2.0.3 lib/govuk_tech_docs/api_reference/templates/schema.html.erb
govuk_tech_docs-2.0.2 lib/govuk_tech_docs/api_reference/templates/schema.html.erb
govuk_tech_docs-2.0.1 lib/govuk_tech_docs/api_reference/templates/schema.html.erb
govuk_tech_docs-2.0.0.pre.test.pre.release.pre.525 lib/govuk_tech_docs/api_reference/templates/schema.html.erb
govuk_tech_docs-2.0.0.pre.test.pre.release.pre.524 lib/govuk_tech_docs/api_reference/templates/schema.html.erb
govuk_tech_docs-2.0.0.test.pre.release.521 lib/govuk_tech_docs/api_reference/templates/schema.html.erb
govuk_tech_docs-2.0.0 lib/govuk_tech_docs/api_reference/templates/schema.html.erb