-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
exactly_one_of seems not work for nested parameters #1288
Comments
It sounds like a bug, try writing a spec that reproduces this? |
Here is the spec that reproduces it.
Result
|
I just tried this spec on both the current HEAD and v0.19.1 and it passes with no problem. |
Closing, @mmkhmk if you can reproduce on HEAD please PR a failing spec. |
I was just able to reproduce this with 1.0. See https://gist.github.com/milgner/d3c229c8dfd6670720403a92066f15f5 for a small, self-contained example. Find a zip of the full application with Gemfile etc at https://oc.illunis.net/index.php/s/ejXzHAYkCcojcCw |
@milgner Can you PR a failing spec from that example on HEAD? |
I'll reopen for now. |
I have a couple of free days coming up, so that shouldn't be a problem 😄 |
I added a test case and am currently looking into fixing it. It seems like the problem is that while I'm not familiar enough with the codebase to make really qualified recommendations, but it seems like it might help to move the part that checks See milgner/grape@8d8586e for the failing spec. |
It looks like the problem might have been introduced in #1625, which changed the behaviour of |
Hello,
I'm currently creating an API with the latest version(0.14.0) but exactly_one_of doesn't work as expected for nested parameters.
Here is the sample.
In this case I meant the validation of exactly_one_of works only when additionalFacets are given.
But it works when it is not given as well.
Can you help check this?
The text was updated successfully, but these errors were encountered: