jdoc 0.1.9 → 0.2.0

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: ede1c30d5aff68f2e68e3f3283716f70ce53c7de
4
- data.tar.gz: df42a4a13574f2e80feb9e500c6f1612ceeed49c
3
+ metadata.gz: c55cb2cd6e9fb7c413955cb27466ea7166210666
4
+ data.tar.gz: 4dd21023b7af214e1eb448d3bd3410e00e4a0e36
5
5
  SHA512:
6
- metadata.gz: 2a6444702d84d35bc36cf9353ea73523384f9ea6ff856771d4e3f6e7276480b4b0b143063e32624501c4b9317164503b5dde4c53db186d68a00e2bd28a8eb0d0
7
- data.tar.gz: a8447fcd1cb335b41b571ffa55fe8b6bcae0be1839dea092325ead4523a43c2eb96a8a6b8f97063d85dc445de59dc9474b9f2c9dec6ae8853aa6903cb3814c14
6
+ metadata.gz: cd723d33c3bfeff779db5a8725829c4895d38a63c7ea6ee787a6c31d6879e95c0e41577975115f2c8688f874325b9f6d353777e43451d6375e275f369654f0cb
7
+ data.tar.gz: daba310565e86e8d309582676311b396a76bccbf48b9e4c932b0d616107db36c2d92a66ce62c26df4f1ad4bd00726f526f8fcba9ce7f188c8a07739fb568f1b6
@@ -1,3 +1,6 @@
1
+ ## 0.2.0
2
+ * Show schema description on docs if exists
3
+
1
4
  ## 0.1.9
2
5
  * Support property that has no type
3
6
 
@@ -1,4 +1,5 @@
1
1
  # Example API
2
+ A schema for a small example API.
2
3
  * [App](#app)
3
4
  * [POST /apps](#post-apps)
4
5
  * [DELETE /apps/:id](#delete-appsid)
@@ -21,6 +21,15 @@ module Jdoc
21
21
  @json_schema.title
22
22
  end
23
23
 
24
+ # @return [String, nil] Description property of this schema
25
+ # @example
26
+ # schema.description #=> "A schema for a small example API."
27
+ def description
28
+ if @json_schema.description
29
+ "#{@json_schema.description}\n\n"
30
+ end
31
+ end
32
+
24
33
  # @return [String]
25
34
  # @example
26
35
  # host_with_port #=> "api.example.com"
@@ -1,3 +1,3 @@
1
1
  module Jdoc
2
- VERSION = "0.1.9"
2
+ VERSION = "0.2.0"
3
3
  end
@@ -1,4 +1,5 @@
1
1
  # <%= schema.title || "API" %>
2
+ <%= schema.description -%>
2
3
  <% schema.resources.each do |resource| %>
3
4
  * <%= resource.hyperlink %>
4
5
  <% resource.links.each do |link| %>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jdoc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryo Nakamura
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-27 00:00:00.000000000 Z
11
+ date: 2014-07-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport