ruby-grape / ruby-grape/grape

Grape::Exceptions::UnknownParameter (unknown parameter: {:params1=>#<Proc:0x007f852ea80128@base.rb:52 (lambda)>}):

Open
#1,576 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug?
Dominant language
Ruby
Stars
10k
Forks
1.2k
Avg merge
14h 38m
Merged PRs (30d)
92

Description

params do
    optional :params1
    given params1: ->(val) {val == false} do
       require :params2
    end
end

While this api is being called I'm getting Unknown Parameter error.

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

No file or test is named in the report. Start by reproducing the params/given definition and the API call that produces the Unknown Parameter error, then trace how the optional parameter and conditional requirement are validated. Done means the reported definition is accepted without the Unknown Parameter error, with a regression test covering the case.

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
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.