Merge pull request #349 from pcgamer1/no_auth_for_empty_obj

Added a check for an empty object for no authorization
This commit is contained in:
Vishal Shingala
2021-05-11 20:46:34 +05:30
committed by GitHub
3 changed files with 64 additions and 0 deletions

View File

@@ -1037,6 +1037,12 @@ module.exports = {
}
securitySet.forEach((security) => {
if (_.isObject(security) && _.isEmpty(security)) {
helper = {
type: 'noauth'
};
return false;
}
securityDef = openapi.securityDefs[Object.keys(security)[0]];
if (!_.isObject(securityDef)) {
return;