Farmbot-Web-App/api_docs.md.erb

29 lines
496 B
Plaintext

<% if (response.successful? || note.present?) %>
# <%= response.successful? ? "" : "(NOT OK)" %> <%= request.pretty_url %>
<% if note.present? %>
**Notes:** <%= note %>
<% end %>
<% if (request.has_params? || request.has_body?) %>
<% if request.display_body.length > 4 %>
### Request
```
<%=
request.display_body
%>
```
<% end %>
<% end %>
### Response
```
<%=
begin
JSON.pretty_generate(JSON.parse(response.body)).first(500)
rescue => e
"Empty Response"
end
%>
```
<% end %>