express-openapi-validator
express-openapi-validator copied to clipboard
Multipart FormData - Boolean validation issue
Describe the bug If I send a multipart form data (File + Body), the body validation failed due to a boolean in it.
To Reproduce Send a multipart form data with boolean in it. Add the validation middleware with a boolean required in the validatin schema.
Actual behavior Failed with "XXX must be boolean" while the value is "true" in the form data string.
Expected behavior This validation should not failed as coercevalues is set to true by default.
I saw different issue on this in the past, may be there was a regression somewhere? or in AJV?
thanks,
by reading again the docs, it seems that coercevalue is not applied to body, is that correct?
If so, how should we handle this case?
Thanks,
Any tips to solve this case?