Issue with same param name in different given blocks
Open
Nobody has claimed this yet.
bug?
- Dominant language
- Ruby
- Stars
- 10k
- Forks
- 1.2k
- Avg merge
- 14h 38m
- Merged PRs (30d)
- 92
Description
.....
given name: ->(val) do
val == 'name'
end do
requires :values, type: Array[String]
end
given name: ->(val) do
val == 'another_name'
end do
requires :values, type: Array[Json]
end
....
Seems like the check on the values param in the second block override the first. When both the blocks are executed in the same call the second check on values fails as invalid.
Sounds like a bug?
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 reproducing the two given blocks in a small Grape API and trace how each values parameter validation is registered and applied. Done means both blocks can execute in the same call while preserving their distinct Array[String] and Array[Json] checks.
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