mirror of
https://github.com/postmanlabs/openapi-to-postman.git
synced 2022-11-29 22:05:00 +03:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user