forked from ruby-grape/grape
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Address ruby-grape#543 - raise proper validation errors on array/hash…
… types * Also adds a :type option to group/requires/optional with block, which can either be Array or Hash. It defaults to Array. * Fixes (2) and (3) as mentioned in ruby-grape#543 * There is a quirk around query parameters: an empty array should pass validation if the array itself is required, but with how query parameters work, it doesn't. It does work fine with body parameters using JSON or similar, which do have a concept of an empty array.
- Loading branch information
Showing
4 changed files
with
27 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters