api_sketch 0.1.7 → 0.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/api_sketch/model/resource.rb +1 -1
- data/lib/api_sketch/templates/bootstrap/resource.html.erb +9 -0
- data/lib/api_sketch/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 68f62ab883d172e240a3787caa8818fe0c10da04
|
|
4
|
+
data.tar.gz: 58de377183e7e514e68de1bcffba71a746d53b74
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e9416e753f030ffc72338e18153b69831c71742b5f6bcd1c063ca43706de5e46274f373e9927f05a15e5f049ad9190790c0664533cccf0424f65056f3b13597d
|
|
7
|
+
data.tar.gz: 410f33116dac105a78eae8118788ea0b9d6213b42ad91a199f39786153220b20dc1a357fe23379b8e8afc0360a57953490e4aca3cd9bd2476f4fe201f6c1736d
|
data/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
class ApiSketch::Model::Resource < ApiSketch::Model::Base
|
|
2
2
|
|
|
3
|
-
attr_accessor :namespace, :action, :path, :http_method, :format, :headers, :parameters, :responses, :sample_call
|
|
3
|
+
attr_accessor :namespace, :action, :path, :http_method, :format, :headers, :parameters, :responses, :sample_call, :sample_response
|
|
4
4
|
|
|
5
5
|
# TODO: update this method to provide better id that is used as part of filename
|
|
6
6
|
def id
|
|
@@ -208,6 +208,15 @@
|
|
|
208
208
|
<div class="panel-body"><%= @resource.sample_call %></div>
|
|
209
209
|
</div>
|
|
210
210
|
<% end %>
|
|
211
|
+
|
|
212
|
+
<% if !(@resource.sample_response.nil? || @resource.sample_response.empty?) %>
|
|
213
|
+
<div class="panel panel-default">
|
|
214
|
+
<div class="panel-heading">Sample Call</div>
|
|
215
|
+
<div class="panel-body">
|
|
216
|
+
<pre><%= @resource.sample_response %></pre>
|
|
217
|
+
</div>
|
|
218
|
+
</div>
|
|
219
|
+
<% end %>
|
|
211
220
|
</div>
|
|
212
221
|
</div>
|
|
213
222
|
|
data/lib/api_sketch/version.rb
CHANGED