lib/grape-swagger/endpoint/params_parser.rb in grape-swagger-0.31.0 vs lib/grape-swagger/endpoint/params_parser.rb in grape-swagger-0.31.1
- old
+ new
@@ -49,12 +49,14 @@
end
def param_type_is_array?(param_type)
return false unless param_type
return true if param_type == 'Array'
+
param_types = param_type.match(/\[(.*)\]$/)
return false unless param_types
+
param_types = param_types[0].split(',') if param_types
param_types.size == 1
end
def public_params
@@ -62,9 +64,10 @@
end
def public_parameter?(param)
param_options = param.last
return true unless param_options.key?(:documentation) && !param_options[:required]
+
param_hidden = param_options[:documentation].fetch(:hidden, false)
param_hidden = param_hidden.call if param_hidden.is_a?(Proc)
!param_hidden
end
end