express-openapi-validator
express-openapi-validator copied to clipboard
encoding, contentType: image/jpeg not validated
I have a request with the following body:
requestBody:
content:
multipart/form-data:
schema:
type: object
properties:
avatar:
type: string
format: binary
encoding:
avatar:
contentType: image/jpeg
However I can just upload a image/png
and express-openapi-valdator doesn't care :-/
same is for mp4, there is a part missing @tamis-laan how did you manage to?
@sghoe Nope, I postponed this for other work. Planning to fix this by manually checking the media type for now. I remember there is a package called mime for nodejs that you can use: https://www.npmjs.com/package/mime But ugly solution...