Sha256: ac0308deec82826b0cf0a34bbe305705157e74d0ef72fdbc752f6a8d364aab1b

Contents?: true

Size: 1.29 KB

Versions: 1

Compression:

Stored size: 1.29 KB

Contents

#  <a class="header-link" name="resource-<%= schemata['title'] %>"><%= schemata['title'] %></a>

<% (schemata['links'] || []).each do |link, datum| %>

## <a class="header-link" name="link-<%= link['method'] %>-<%= resource %>-<%= link['href'] %>"><%= schemata['title'] %> <%= link['title'] %></a>

<%= link['description'] %>

```
<%= link['method'] %> <%= link['link_path'] %>
```

<% if link['required_properties'] && !link['required_properties'].empty? %>
## Required Parameters

| Name | Type | Description | Example |
| ------- | ------- | ------- | ------- |
<%- link['required_properties'].each do |property_ref| -%>
| **<%= property_ref[:name] %>** | *<%= property_ref[:type] %>* | <%= property_ref[:description] %> | <%= property_ref[:example] %> |
<%- end -%>

<% end %>

<% if link['optional_properties'] && !link['optional_properties'].empty? %>
## Optional Parameters

| Name | Type | Description | Example |
| ------- | ------- | ------- | ------- |
<%- link['optional_properties'].each do |property_ref| -%>
| **<%= property_ref[:name] %>** | *<%= property_ref[:type] %>* | <%= property_ref[:description] %> | <%= property_ref[:example] %> |
<%- end -%>

<% end %>

<%= include.('example.md.erb', example: link['example']) %>

<%= include.('response.md.erb', response: link['response']) %>

<% end %>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
json-schema-docs-0.1.0 lib/json-schema-docs/layouts/endpoint.md.erb