Skip to content

Should the minimum, maximum values be only Integer type? #904

Description

@artyomb

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) 

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions