-
-
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
Add nested array coercion spec #2098
Conversation
My current assumption is that the type_check provided by the infer_type_check method can't evaluate the returned array of array. coerced?(coerced_val) returns the following error : "*** TypeError Exception: class or module required" |
15019af
to
2fa48f1
Compare
1256d3c
to
1f0b141
Compare
Some progress here, recursive objects were not recursively verified. The proposed fix works on our side. But i cannot manage to get it working on spec side... What I notice is that the rack_params returned by the ParamBuilder is flatten [[]] returns [[""]] which seems a bit odd. [['a', { bar: 0 }], ['b']] is currently considered as incorrect, but not for the good reason. It is currently wrong due to the flatten and not because of the hash Any hint about it ? The large model returns as expected {"skills_v1":[["vehicule1"]],"skills_v2":[["vehicule1","vehicule2"]]} |
Try POSTing JSON in the spec? |
Thanks ! |
🚀 |
If you feel like doing more work, there's a number of issues that have "coercion" in the title that could be in the same code path ;) |
The coerce seems to be performed correctly, nevertheless, once we want to match the obtained value to the expected type it fails.
Seems related to : #2054