ruby-grape / ruby-grape/grape-swagger
Should the minimum, maximum values be only Integer type?
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 1.1k
- Forks
- 479
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 6
Description
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)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read lib/grape-swagger/doc_methods/parse_params.rb around line 165 and compare the minimum and maximum handling with the referenced Swagger specification. Determine whether numeric float and double values should be accepted alongside integers; done means the behavior matches the specification for the described values.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- api, documentation
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100