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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6480091004b71f2a3a6ddc2bf958f2f372d9fd24
4
- data.tar.gz: 8817d24c6ae9b14813e4f91cf301917f4d76975d
3
+ metadata.gz: dca42f9cb3bf6c1ebf3e18ce5c48f953ad435b6f
4
+ data.tar.gz: ca68694f83a4442d040f4146d517891e59411a32
5
5
  SHA512:
6
- metadata.gz: 288642a1dc0c4163295cc6aea4feefc5cca8f69f4df890650aa1966cab83cd58a599aa0531ee0805e52b3114ccf53e234c86412d4f515bac03ab31389b5cf7ec
7
- data.tar.gz: f1828a445b04cb792439f2e444778c2edbe1cd50d594ca3c529797fed751ba1304c80705afb3511b68de4393de4e8fbf2b1fc8671f67159299ad0223a1d3823a
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 %>
@@ -1,3 +1,3 @@
1
1
  module GrapeDocs
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
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.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