api_doc_generation 0.0.7 → 0.0.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/lib/api_doc_generation/version.rb +1 -1
- data/lib/api_doc_generation/view_helper.rb +5 -0
- data/templates/doc_detailed.html.erb +33 -0
- 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: 4a59367781747d4ca6e94511c8045e8d74321ca1
|
|
4
|
+
data.tar.gz: 4eb0b36c7174d662bf5d9e32b0ffcc8bd56be26c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4c05f53ce3c4ea401131c8eff1ce55a80c9af707f59324efee5f99d5b4008659d7146ab5df2647a9be91c3351484eebecca557956bfc3106adb651986ec54688
|
|
7
|
+
data.tar.gz: 22b878cb56d46e98e571d02375d94970c35f6641fe7b78a24550cf8dfc76fd24b88a5f1407e1ea984a8883a10a8d6240199fdfa2808663fd66fbbbdba899bfe6
|
|
@@ -207,6 +207,39 @@
|
|
|
207
207
|
</tbody>
|
|
208
208
|
</table>
|
|
209
209
|
|
|
210
|
+
<% action.each do |key, val| %>
|
|
211
|
+
<% next if %w{desc path method Params Return Error name}.include?(key.to_s) %>
|
|
212
|
+
<h4><%= key %></h4>
|
|
213
|
+
<% unless val && (val.is_a?(Array) && val.length > 1) %>
|
|
214
|
+
<p>
|
|
215
|
+
<% if val.is_a?(Array) %>
|
|
216
|
+
<%= val.first[:desc] %>
|
|
217
|
+
<% else %>
|
|
218
|
+
<%= val %>
|
|
219
|
+
<% end %>
|
|
220
|
+
</p>
|
|
221
|
+
<% else %>
|
|
222
|
+
<table class='table table-bordered table-striped'>
|
|
223
|
+
<thead>
|
|
224
|
+
<th>参数名</th>
|
|
225
|
+
<th>参数类型</th>
|
|
226
|
+
<th>描述</th>
|
|
227
|
+
</thead>
|
|
228
|
+
|
|
229
|
+
<tbody>
|
|
230
|
+
<% (action[key] || []).each do |param| %>
|
|
231
|
+
<% format_other_param(param) %>
|
|
232
|
+
|
|
233
|
+
<tr>
|
|
234
|
+
<% [:name, :type, :val].each do |key| %>
|
|
235
|
+
<td><%= param[key] %></td>
|
|
236
|
+
<% end %>
|
|
237
|
+
</tr>
|
|
238
|
+
<% end %>
|
|
239
|
+
</tbody>
|
|
240
|
+
</table>
|
|
241
|
+
<% end %>
|
|
242
|
+
<% end %>
|
|
210
243
|
<br /><hr />
|
|
211
244
|
</div>
|
|
212
245
|
<% end %>
|