fix list field accept dict parameter bug#597
fix list field accept dict parameter bug#597Friday21 wants to merge 1 commit intonoirbizarre:masterfrom
Conversation
|
Thanks for contributing! Could you please provide some example code to reproduce the issue in the same way you encountered it? |
I think the test case I add in test_format_error has already include one example |
|
I see the test case (thank you for that), however it's not a full example of the use case that you described. Calling the |
OK, so here is my example in real project(change some name to hide work info): first, the input model definition: and, here is the code in the rest api code: and then, I send request through postman with list_time field as list of object this works as expected. then I send list_time field as object: it should have return parameter error, but it didn't, it just pass on. the print info is below: |



when I use List field with nested object field, I find out when the client pass the object filed(not as list), the parameter check didn't throw parameter error(400), so I got a json object in my view layer, that is not what I expected, thus trigger a bug。