lib/swagger_yard/property.rb in swagger_yard-0.3.7 vs lib/swagger_yard/property.rb in swagger_yard-0.4.0

- old
+ new

@@ -24,14 +24,16 @@ @required end def to_h @type.to_h.tap do |h| - h["description"] = description if description - if @nullable - h["x-nullable"] = true - if h["type"] - h["type"] = [h["type"], "null"] + unless h['$ref'] + h["description"] = description if description + if @nullable + h["x-nullable"] = true + if h["type"] + h["type"] = [h["type"], "null"] + end end end end end end