Skip to content

Commit

Permalink
disable canVailidate check
Browse files Browse the repository at this point in the history
  • Loading branch information
Carmine DiMascio committed Apr 13, 2020
1 parent 3ccbbad commit 362d988
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/middlewares/openapi.response.validator.ts
Expand Up @@ -151,15 +151,15 @@ export class ResponseValidator {
}

if (!body) {
throw validationError(501, '.response', 'response body required.');
throw validationError(500, '.response', 'response body required.');
}

// CHECK If Content-Type is validatable
if (!this.canValidateContentType(contentType)) {
console.warn('Cannot validate content type', contentType);
// assume valid
return;
}
// // CHECK If Content-Type is validatable
// if (!this.canValidateContentType(contentType)) {
// console.warn('Cannot validate content type', contentType);
// // assume valid
// return;
// }

const valid = validator({
response: body,
Expand Down

0 comments on commit 362d988

Please sign in to comment.