ruby-grape / ruby-grape/grape-swagger

Array params are always sent as `formData` on GET requests

Open
#792 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Ruby
Stars
1.1k
Forks
479
Avg merge
2d 14h
Merged PRs (30d)
6

Description

Hello, and thank you for such an amazing piece of software.

I'm not sure how it was planned to be, but I've noticed that array params are always been sent as formData, even on GET requests. However, any other than query params are not usually accepted when sending the GET requests.

Yep, it's possible to set param_type through documentation: {}, but that's not always comfortable to do.

Here's my little fix: https://github.com/newstler/grape-swagger/pull/1/commits/f66655462ba7140a113338c0021076bbb330e810

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue does not name a file or test. Start by tracing how array parameters are assigned for GET requests, then compare the behavior with the referenced commit. Done means GET array parameters use query parameters by default rather than formData, while preserving the existing documentation override.

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
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.