rails_api_documentation 0.1.3 → 0.1.4
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 92674ef7fe08b55c35b27a5e92c90afedd9cd15f
|
4
|
+
data.tar.gz: 55d5ae74861d6d475ffc1848ea8727e378865895
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 46978e7b3c973683f12affacdc4ef3dfec94d02a5e3fe4f6819061305f80bab7cb1f5d1062e6ad24cbc44190769c5da44df61d29acc6a42bd67bddd229edb5a4
|
7
|
+
data.tar.gz: f630ac4516c07e5fd609f20d7152b7903b53d754b42131bbb14c66ba0943dd3a27f267bfa7061aeeff001c060f617fc9b4436852804f5682172351bd5fb50c5d
|
@@ -2,6 +2,7 @@ div[href=(model.to_s + '.response') style="--row-count: 3"]
|
|
2
2
|
- repo.map[model][:actions].each do |action|
|
3
3
|
// TODO: Nest table in this div for easier jq toggling
|
4
4
|
// add borders to this div
|
5
|
-
|
6
|
-
|
7
|
-
|
5
|
+
- if route = repo.action_route(model, action)
|
6
|
+
div.request-action-title #{repo.action_route(model, action)}
|
7
|
+
- if data = repo.load_template(model, action)
|
8
|
+
= render 'shared/response_table', locals: { model: model, rows: data }
|
@@ -29,6 +29,7 @@ class RailsApiDoc::Controller::Response
|
|
29
29
|
|
30
30
|
def action_route(ctrl, action)
|
31
31
|
action_route = @map[ctrl][:routes].detect { |r| r.defaults[:action] == action }
|
32
|
+
return unless action_route
|
32
33
|
method = action_route.instance_variable_get(:@request_method_match)&.first&.name&.split('::')&.last
|
33
34
|
route = action_route.path.spec.to_s
|
34
35
|
[method, route].compact.join(' ')
|