apipie-rails 0.5.11 → 0.5.12

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e7d88dded075d493175af924c28b12d0a5f8bf1e
4
- data.tar.gz: ecb35e91359fe60787a7364a9b427f0322260f30
3
+ metadata.gz: 5ff91284d6576af7f50913921c4b677f67a1e163
4
+ data.tar.gz: 0cd61c342c534f728d0d210b47d28d1ccb903663
5
5
  SHA512:
6
- metadata.gz: cdd586c211924d6c84830aa2d014355edef2e7c63fd7e3e90e2c02beba0ad440e756244fadaf96178b57d9a2fce45c3e0177ef95d941a6096ce876f8c318f68c
7
- data.tar.gz: 17381631aa321f511da743d329b6c0cbfd08d4b12581ab83b2f15f9ba07ab0ef02fbc11fadacdc7bdcbd13797262278f1df71a460c75e90cf0a44721ead062c7
6
+ metadata.gz: 373f9ba52ccbec5af1691a8d8d58e9d5631903a0a356020c0ee5265dce36e7d9240a21ded67407ad2d8ded8642ef36a99b334919c738b0d441ab0cbb486c9411
7
+ data.tar.gz: c2fcf805fc6eb9a27826e1057780f53b06a20c05db585a4abd89f2fba9372c0a987cd3e54cdaf64b91ee19fa4c951e29a0a57b1db4bf374360d10e71ae752ab9
@@ -1,6 +1,10 @@
1
1
  Changelog
2
2
  ===========
3
3
 
4
+ v0.5.12
5
+ -------
6
+ - Fix returns displaying [\#635](https://github.com/Apipie/apipie-rails/pull/635) ([X1ting](https://github.com/X1ting))
7
+
4
8
  v0.5.11
5
9
  -------
6
10
 
@@ -36,5 +36,22 @@
36
36
  </tbody>
37
37
  </table>
38
38
  <% end %>
39
+ <% unless method[:returns].blank? %>
40
+ <%= heading(t('apipie.returns'), h_level) %>
41
+ <% method[:returns].each do |item| %>
42
+ <%= heading("#{t('apipie.code')}: #{item[:code]}", h_level + 1) %>
43
+ <table class='table'>
44
+ <thead>
45
+ <tr>
46
+ <th><%= t('apipie.param_name') %></th>
47
+ <th><%= t('apipie.description') %></th>
48
+ </tr>
49
+ </thead>
50
+ <tbody>
51
+ <%= render(:partial => "params", :locals => {:params => item[:returns_object]}) %>
52
+ </tbody>
53
+ </table>
54
+ <% end %>
55
+ <% end %>
39
56
 
40
57
  <%= render(:partial => "headers", :locals => {:headers => method[:headers], :h_level => h_level }) %>
@@ -21,8 +21,10 @@
21
21
  <%- if param[:validator].present? %>
22
22
  <li><%= Apipie.markup_to_html(param[:validator]).html_safe %></li>
23
23
  <%- end %>
24
- <%- param[:validations].each do |item| %>
25
- <li><%= item.html_safe %></li>
24
+ <%- if param[:validations].present? %>
25
+ <%- param[:validations].each do |item| %>
26
+ <li><%= item.html_safe %></li>
27
+ <%- end %>
26
28
  <%- end %>
27
29
  </ul>
28
30
  <%- end %>
@@ -29,3 +29,4 @@ en:
29
29
  api_documentation: API documentation
30
30
  headers: Headers
31
31
  header_name: Header name
32
+ code: Code
@@ -186,6 +186,7 @@ module Apipie
186
186
  :full_description => Apipie.app.translate(@full_description, lang),
187
187
  :errors => errors.map(&:to_json),
188
188
  :params => params_ordered.map{ |param| param.to_json(lang) }.flatten,
189
+ :returns => @returns.map{ |return_item| return_item.to_json(lang) }.flatten,
189
190
  :examples => @examples,
190
191
  :metadata => @metadata,
191
192
  :see => see.map(&:to_json),
@@ -1,3 +1,3 @@
1
1
  module Apipie
2
- VERSION = '0.5.11'
2
+ VERSION = '0.5.12'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: apipie-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.11
4
+ version: 0.5.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Pokorny
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-10-15 00:00:00.000000000 Z
12
+ date: 2018-10-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails