ruby-grape/grape-swagger

Should the minimum, maximum values be only Integer type?

Opened this issue · 0 comments

https://github.com/ruby-grape/grape-swagger/blob/3a5da56fb3ad19dcb07cf3ef86549bb811e22dcc/lib/grape-swagger/doc_methods/parse_params.rb#L165C67-L165C67

As described in https://docs.swagger.io/spec.html

minimum | string | number, integer | The minimum valid value for the type, inclusive. If this field is used in conjunction with the defaultValue field, then the default value MUST be higher than or equal to this value. The value type is string and should represent the minimum numeric value. Note: This will change to a numeric value in the future.

The values may be number (float or double). Should be the validation be removed?

 ... if values.first.is_a?(Integer)