Skip to content

Commit 8e2e1da

Browse files
authored
Merge pull request #62 from cdimascio/mung_mod
Response Validation Issue - "Cannot read property 'then' of undefined in modded.mung" #61
2 parents d047ccb + 74816c0 commit 8e2e1da

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "express-openapi-validator",
3-
"version": "2.3.0",
3+
"version": "2.3.1",
44
"description": "Automatically validate API requests using an OpenAPI 3 and Express.",
55
"main": "dist/index.js",
66
"scripts": {

src/middlewares/openapi.response.validator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export class ResponseValidator {
2525
}
2626

2727
validate() {
28-
return mung.jsonAsync((body, req: any, res) => {
28+
return mung.json((body, req: any, res) => {
2929
if (req.openapi) {
3030
const responses = req.openapi.schema && req.openapi.schema.responses;
3131
const validators = this._getOrBuildValidator(req, responses);

0 commit comments

Comments
 (0)