-
-
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
Find coerce_type for Array when not specified #826
Conversation
I think this is good. It needs a CHANGELOG entry and definitely more tests: calling the API with an invalid value to start. |
I updated changelog and added some tests. This gets resolved (and all tests pass) if I remake the condition to this:
However it leads to always comparing based on string representation. I see that coercion check is done before code reaches this validation but I am not sure it would be valid change. @dblock could you please comment on it and point me in the right direction? |
Before I answer this, is this even possible: post '/foo', values: [1, 2, 3] Imagine this is outside a client, you can POST JSON, some kind of parseable URI (eg. |
So you think that one test is pointless? |
Right, I think it's not a realistic scenario, works only under RSpec. |
Ok, I removed the test case, fixed Rubocop offenses and rebased against upstream/master. Is it alright now? |
Yes, this is good. Would you please squash your commits, too? I'll merge. |
Done. |
Find coerce_type for Array when not specified
Thanks, merged. |
This PR is an attempt to address issue #795 .
I am not sure I understood it correctly, but it seemed to me that @maxd wanted to create an Array type without specifying what's inside the Array.
I also added one test to make sure this works.