ruby-grape / ruby-grape/grape-swagger
Array group parameters
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 1.1k
- Forks
- 479
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 6
Description
Hi, I have an issue that I believe was fixed by #221 but then got overridden by #455.
I think it was needed to support both cases, not just "fix" those specs: https://github.com/ruby-grape/grape-swagger/pull/455/files#diff-2b857d0b8829328970ec856ccd7d8ac3L43
Right now things like
requires :group, type: Array do
requires :param_1, type: Integer
requires :param_2, type: String
end
are being displayed as a simple Hash, not as an Array.

I would expect to have group[][param_1] and group[][param_2] instead
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
Start by comparing the behavior described in pull requests #221 and #455, especially the referenced diff, then reproduce the nested Array example in this issue. Done means array group parameters are represented as arrays rather than simple hashes and expose the expected group[][param_1] and group[][param_2] fields.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100