Skip to content

Commit

Permalink
Merge pull request #62 from cdimascio/mung_mod
Browse files Browse the repository at this point in the history
Response Validation Issue - "Cannot read property 'then' of undefined in modded.mung" #61
  • Loading branch information
cdimascio authored Oct 7, 2019
2 parents d047ccb + 74816c0 commit 8e2e1da
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "express-openapi-validator",
"version": "2.3.0",
"version": "2.3.1",
"description": "Automatically validate API requests using an OpenAPI 3 and Express.",
"main": "dist/index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/middlewares/openapi.response.validator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export class ResponseValidator {
}

validate() {
return mung.jsonAsync((body, req: any, res) => {
return mung.json((body, req: any, res) => {
if (req.openapi) {
const responses = req.openapi.schema && req.openapi.schema.responses;
const validators = this._getOrBuildValidator(req, responses);
Expand Down

0 comments on commit 8e2e1da

Please sign in to comment.