Closed mschout closed 2 years ago
I have a similar issue to #220 where we have an API that worked with OpenAPI 2.0, but now that we updated to 3.0, form data array values are not properly promoted to array.
example requestbody:
requestBody: required: true content: application/x-www-form-urlencoded: schema: properties: id: type: array items: type: integer
and making a request against this with e.g. id => 123, it returns 400 Bad Request with reason
id => 123
400 Bad Request
{ "errors": [ { "message": "Expected array - got string.", "path": "/body/id" } ], "status": 400 }
I have the latest JSON::Validator (5.04) if that helps.
JSON::Validator
Thanks for reporting in!
This is fixed in https://github.com/jhthorsen/json-validator/commit/65b31df8a319785adb9ab5fbe4462c22e273f8ba aka JSON::Validator 5.05
I have a similar issue to #220 where we have an API that worked with OpenAPI 2.0, but now that we updated to 3.0, form data array values are not properly promoted to array.
example requestbody:
and making a request against this with e.g.
id => 123
, it returns400 Bad Request
with reasonI have the latest
JSON::Validator
(5.04) if that helps.