swagger_yard 0.4.2 → 0.4.3

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: 57daf037b584866759b6fda0e5ffdc0d124340bd
4
- data.tar.gz: 0d4720ed2cecf5a8fed97a67401a1334dabb849e
3
+ metadata.gz: e89a490cac5cca8d1ec701e2f2a4eb973656ca23
4
+ data.tar.gz: ffdff3722d5835e866ae2704abd497aaa0da2f22
5
5
  SHA512:
6
- metadata.gz: c8856072ad3ac9bb8fec82844fbd834e937b148c2e14b47ebbe146d7dec00ef85f93f08535353341cd00273ec429d85558d0e11b1d4da4e8ac07883b141fa48b
7
- data.tar.gz: 37c557b40954d6a9c3aaf2dd700462fb5b4ed7a6d2e32a4bc05f4e084a4ebaeebaa5c715c2f5f94a3bf6974ce347aadc1040c32a62dc2d2d55af9b72b7f07977
6
+ metadata.gz: 777a8b449750c1d03b655fe007798cf90687a5931b3e1fe43b55133beb71161b6f4d0071caa3e5e3b18f173925ffb56d30844a37cb35902300f3851750309e6f
7
+ data.tar.gz: 04f928e5ccbd37ee4cbab146c2ea2c1005a665674b8b10eb388e5e67046fce5257c86dcd05d4940db8ccef2e3343851ffcf824d269144c3117b6ee4d4c4fd32f
@@ -5,7 +5,7 @@ module SwaggerYard
5
5
  def self.from_yard_tag(tag, operation)
6
6
  name, options_string = tag.name.split(/[\(\)]/)
7
7
  description = tag.text
8
- description = name if description.strip.empty?
8
+ description = name if description.nil? || description.strip.empty?
9
9
  type = Type.from_type_list(tag.types)
10
10
 
11
11
  options = {}
@@ -27,7 +27,7 @@ module SwaggerYard
27
27
  def to_h
28
28
  @type.to_h.tap do |h|
29
29
  unless h['$ref']
30
- h["description"] = description if description
30
+ h["description"] = description if description && !description.strip.empty?
31
31
  if @nullable
32
32
  h["x-nullable"] = true
33
33
  if h["type"]
@@ -1,3 +1,3 @@
1
1
  module SwaggerYard
2
- VERSION = "0.4.2"
2
+ VERSION = "0.4.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: swagger_yard
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - chtrinh (Chris Trinh)
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-04-06 00:00:00.000000000 Z
11
+ date: 2018-05-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: yard
@@ -223,7 +223,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
223
223
  version: '0'
224
224
  requirements: []
225
225
  rubyforge_project:
226
- rubygems_version: 2.6.12
226
+ rubygems_version: 2.5.2.1
227
227
  signing_key:
228
228
  specification_version: 4
229
229
  summary: SwaggerYard API doc through YARD