# <%= schema.title %>
<% schema.resources.each do |resource| %>
* <%= resource.hyperlink %>
<% resource.links.each do |link| %>
 * <%= link.hyperlink %>
<% end %>
<% end %>

<% schema.resources.each do |resource| %>
## <%= resource.title %>
<%= resource.description %>

### Properties
<% resource.properties.each do |property| %>
* <%= property.name %> - <%= property.description %>
<% property.options.each do |key, value| %>
 * <%= key %>: <%= value %>
<% end %>
<% end %>

<% resource.links.each do |link| %>
### <%= link.endpoint %>
<%= link.description %>

```
<%= link.method %> <%= link.path %> HTTP/1.1
<%= "Content-Type: application/json\n" if link.has_request_body? -%>
Host: <%= schema.host_with_port %>
<%= "\n" + link.request_body if link.has_request_body? -%>
```

```
HTTP/1.1 <%= link.response_status %>
Content-Type: application/json

<%= link.response_body %>
```

<% end %>
<% end %>

# <%= schema.title || "API" %>
<% schema.resources.each do |resource| %>
* <%= resource.hyperlink %>
<% resource.links.each do |link| %>
 * <%= link.hyperlink %>
<% end %>
<% end %>

<% schema.resources.each do |resource| %>
## <%= resource.title %>
<%= resource.description %>

### Properties
<% resource.properties.each do |property| %>
* <%= property.name %> - <%= property.description %>
<% property.options.each do |key, value| %>
 * <%= key %>: <%= value %>
<% end %>
<% end %>

<% resource.links.each do |link| %>
### <%= link.endpoint %>
<%= link.description %>

```
<%= link.method %> <%= link.path %> HTTP/1.1
<%= "Content-Type: application/json\n" if link.has_request_body? -%>
Host: <%= schema.host_with_port %>
<%= "\n" + link.request_body if link.has_request_body? -%>
```

```
HTTP/1.1 <%= link.response_status %>
Content-Type: application/json

<%= link.response_body %>
```

<% end %>
<% end %>

Put "API" if top-level title property does not exist
Put "API" if top-level title property does not exist
