Fixed issue where we threw TypeError for undefined parameters

This commit is contained in:
Vishal Shingala
2021-12-08 00:24:56 +05:30
parent 93c0646697
commit f46232161d

View File

@@ -500,13 +500,13 @@ module.exports = {
pathParam = [];
}
pathParam.forEach((param, index, arr) => {
if (param.hasOwnProperty('$ref')) {
if (_.has(param, '$ref')) {
arr[index] = this.getRefObject(param.$ref, components, options);
}
});
operationParam.forEach((param, index, arr) => {
if (param.hasOwnProperty('$ref')) {
if (_.has(param, '$ref')) {
arr[index] = this.getRefObject(param.$ref, components, options);
}
});