api_doc_generation 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e69b11e694bfdc63ec6469630388ab845e144690
4
- data.tar.gz: b8998bf6a3c0b39ee0945c40ef2c547764fb7c6f
3
+ metadata.gz: 4a59367781747d4ca6e94511c8045e8d74321ca1
4
+ data.tar.gz: 4eb0b36c7174d662bf5d9e32b0ffcc8bd56be26c
5
5
  SHA512:
6
- metadata.gz: af07fb900968d7caf08d9c77346d8fb7b6e7cefecb7eb289775553d9f5ead6bb94b9442154873fc80883f08b70a2a50963ea079c704adbf6a45c5dd12f3d4180
7
- data.tar.gz: b83693944d15f3cfe2441e6adefc043bdbf73be46c408a9ad324d6011c0291cb0df3feb7c2e9f5f9bceb7a4b1e222128504aee810aab03212ffe8649f11f7ff5
6
+ metadata.gz: 4c05f53ce3c4ea401131c8eff1ce55a80c9af707f59324efee5f99d5b4008659d7146ab5df2647a9be91c3351484eebecca557956bfc3106adb651986ec54688
7
+ data.tar.gz: 22b878cb56d46e98e571d02375d94970c35f6641fe7b78a24550cf8dfc76fd24b88a5f1407e1ea984a8883a10a8d6240199fdfa2808663fd66fbbbdba899bfe6
@@ -1,3 +1,3 @@
1
1
  module ApiDocGeneration
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.8"
3
3
  end
@@ -75,4 +75,9 @@ module ApiDocGeneration; class ViewHelper
75
75
  param[:val] = '数据的总页数'
76
76
  end
77
77
  end
78
+
79
+
80
+ def format_other_param(param)
81
+
82
+ end
78
83
  end; end
@@ -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 %>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: api_doc_generation
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - jiangzhi.xie