-
Notifications
You must be signed in to change notification settings - Fork 463
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parameter validation: Raises error for all missing #886
Parameter validation: Raises error for all missing #886
Conversation
@@ -24,6 +24,20 @@ def initialize(param) | |||
end | |||
end | |||
|
|||
class ParamMultipleMissing < ParamError |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be nice to inherit from the same error as ParamMissing
, but we do not have the defined param
here.
- Instead of just raising `ParamMissing` for the first missing, instead raise a compound `ParamMultipleMissing` if there are more than one missing. - Adds specs for both POST and GET requests. - Fixes Apipie#802
758bd7c
to
2b44883
Compare
I have no good way to solve the last rubocop warnings, do you usually add ignores if the complexity grows? Not sure if I can split it up more since it is meta-programming |
Running |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, its OK to ignore ModuleLength
and BlockLength
rubocop offenses, you can use the comment as @PanosCodes suggested. and I will merge.
Thank you
Thanks! 🙂 |
ParamMissing
for the first missing,instead raise a compound
ParamMultipleMissing
if there are morethan one missing.