grape-docs 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/assets/default.md.erb +33 -0
- data/assets/gitbook.md.erb +31 -0
- data/lib/grape_docs/version.rb +1 -1
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dca42f9cb3bf6c1ebf3e18ce5c48f953ad435b6f
|
4
|
+
data.tar.gz: ca68694f83a4442d040f4146d517891e59411a32
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4b07ef4bdc8289afa603d09783ece3e4a0a165314182a4c1e1b417f3141ca102462ce7c4c7cc0a2e2b5842d372b40e21ecf9dd24b357f2d7f350702e9f4aaa44
|
7
|
+
data.tar.gz: dfb0aaf022be41feebe3ff107969f2070a844fbe745f81ab45dc1418e27370fd38c0439bf4e36b9f1ba939d8baed54d1e90c8481003997910a82275557123dba
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# <%= api.title %>
|
2
|
+
|
3
|
+
<%= api.detail %>
|
4
|
+
|
5
|
+
<% api.endpoints.each do |endpoint| %>
|
6
|
+
## <%= endpoint.title %>
|
7
|
+
**URL:** <%= endpoint.url %>
|
8
|
+
|
9
|
+
<%= endpoint.detail %>
|
10
|
+
|
11
|
+
### Request
|
12
|
+
|
13
|
+
**METHOD:** <%= endpoint.method %>
|
14
|
+
**PATH:** <%= endpoint.path %>
|
15
|
+
|
16
|
+
### Parameters:
|
17
|
+
<%= table(endpoint.params, :name, :type, :desc) do |param|
|
18
|
+
if param[:required]
|
19
|
+
param[:name] = "**#{param[:name]}**"
|
20
|
+
end
|
21
|
+
end %>
|
22
|
+
|
23
|
+
<% if endpoint.response %>
|
24
|
+
### Response:
|
25
|
+
<%= json(endpoint.response) %>
|
26
|
+
<% end %>
|
27
|
+
<% end %>
|
28
|
+
|
29
|
+
<% if api.children.length > 0 %>
|
30
|
+
## APIs
|
31
|
+
<% api.children.each do |child| %>
|
32
|
+
* [<%= child.title %>](<%= document_url(child)%>)<% end %>
|
33
|
+
<% end %>
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# <%= api.title %>
|
2
|
+
|
3
|
+
<%= api.detail %>
|
4
|
+
|
5
|
+
<% api.endpoints.each do |endpoint| %>
|
6
|
+
{% api "<%= endpoint.title %>", method="<%= endpoint.method %>", url="<%= endpoint.path %>" %}
|
7
|
+
|
8
|
+
**URL:** <%= endpoint.url %>
|
9
|
+
|
10
|
+
<%= endpoint.detail %>
|
11
|
+
|
12
|
+
### Parameters:
|
13
|
+
|
14
|
+
<%= table(endpoint.params, :name, :type, :desc) do |param|
|
15
|
+
if param[:required]
|
16
|
+
param[:name] = "**#{param[:name]}**"
|
17
|
+
end
|
18
|
+
end %>
|
19
|
+
<% if endpoint.response %>
|
20
|
+
### Response:
|
21
|
+
|
22
|
+
<%= json(endpoint.response) %>
|
23
|
+
<% end %>
|
24
|
+
|
25
|
+
{% endapi %}
|
26
|
+
<% end %>
|
27
|
+
<% if api.children.length > 0 %>
|
28
|
+
## APIs
|
29
|
+
<% api.children.each do |child| %>
|
30
|
+
* [<%= child.title %>](<%= document_url(child)%>)<% end %>
|
31
|
+
<% end %>
|
data/lib/grape_docs/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: grape-docs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tobias Strebitzer
|
@@ -116,6 +116,8 @@ extensions: []
|
|
116
116
|
extra_rdoc_files: []
|
117
117
|
files:
|
118
118
|
- README.md
|
119
|
+
- assets/default.md.erb
|
120
|
+
- assets/gitbook.md.erb
|
119
121
|
- bin/grape-docs
|
120
122
|
- lib/grape_docs.rb
|
121
123
|
- lib/grape_docs/api.rb
|