Skip to content

Commit 03cdd9d

Browse files
committed
tolerate missed paths object
1 parent 76a560f commit 03cdd9d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

forward_engineering/helpers/validationHelper.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ const createPathParameterError = (pathName, parameter) => {
104104
const checkPathParameters = (schema) => {
105105
const requestNames = ["get", "put", "post", "delete", "options", "head", "patch", "trace", "$ref"];
106106

107-
return Object.keys(schema.paths).reduce((errors, pathName) => {
107+
return Object.keys(schema.paths || {}).reduce((errors, pathName) => {
108108
const pathParameters = getPathParameters(pathName);
109109
const requests = schema.paths[pathName] || {};
110110

0 commit comments

Comments
 (0)