Closed igor-savin-ht closed 6 years ago
Clarification: requests still seem to fail due to wrong data structure, but getting proper error about content-type being wrong would be more useful. I've created a test for this case in linked PR.
Thanks @igor-savin-ht.
Do you think that validating the content-type header vault against the consumes
filed in the swagger will be good enough?
@idanto Yeah, that would be perfect.
If Swagger specifies 'consumes' field for the service or the route, would be nice if express-ajv-swagger-validaiton library would use this data to check if data was sent of appropriate type.