We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hello,
we're having trouble using coerce_with helper since this commit: 7411e2f
coerce_with
Here is a test showing the problem we have: https://github.com/ngonzalez/grape-test-app/blob/master/test/controllers/api_test.rb https://github.com/ngonzalez/grape-test-app/blob/master/app/api/twitter/api.rb
# Running: F... Finished in 0.188642s, 21.2042 runs/s, 37.1073 assertions/s. 1) Failure: ApiTest#test_test_2 [/home/ngonzalez/Sites/grape-test-app/test/controllers/api_test.rb:18]: Expected: [1, 2, 3, 4] Actual: {"error"=>"values is invalid"} 4 runs, 7 assertions, 1 failures, 0 errors, 0 skips
Array type is working fine with coerce_with but we need Array[Integer]
Array
Array[Integer]
We have a branch with the same test and Grape version freezed: https://github.com/ngonzalez/grape-test-app/compare/before-changes
In this branch, tests pass without errors:
# Running: .... Finished in 0.197692s, 20.2335 runs/s, 40.4669 assertions/s. 4 runs, 8 assertions, 0 failures, 0 errors, 0 skips
Is Array[Integer] going to be fixed in future versions of Grape ?
Thanks
Nicolas Gonzalez
The text was updated successfully, but these errors were encountered:
This looks like a bug. Start by making a pull request with the failing spec. Don't hesitate to try to fix it, too. /cc: @dslh
Sorry, something went wrong.
@dblock Here's the Pull Request https://github.com/ruby-grape/grape/pull/1325/files
Params: Fixes ruby-grape#1324, Allow using coerce_with when type is e…
a5b8460
…ither Array[String] or Array[Integer]
No branches or pull requests
Hello,
we're having trouble using
coerce_with
helper since this commit: 7411e2fHere is a test showing the problem we have:
https://github.com/ngonzalez/grape-test-app/blob/master/test/controllers/api_test.rb
https://github.com/ngonzalez/grape-test-app/blob/master/app/api/twitter/api.rb
Array
type is working fine withcoerce_with
but we needArray[Integer]
We have a branch with the same test and Grape version freezed:
https://github.com/ngonzalez/grape-test-app/compare/before-changes
In this branch, tests pass without errors:
Is
Array[Integer]
going to be fixed in future versions of Grape ?Thanks
Nicolas Gonzalez
The text was updated successfully, but these errors were encountered: