Skip to content

Commit

Permalink
Fix JS scoping issue
Browse files Browse the repository at this point in the history
  • Loading branch information
andrzejwp authored Dec 17, 2019
1 parent eef4738 commit e4bc522
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions openapi-to-har.js
Original file line number Diff line number Diff line change
Expand Up @@ -256,11 +256,12 @@ const getHeadersArray = function (openApi, path, method) {
const secScheme = Object.keys(openApi.security[m])[0]
const secDefinition = openApi.components.securitySchemes[secScheme];
const authType = secDefinition.type.toLowerCase();
let authScheme = null;

if(authType !== 'apikey'){
let authScheme = secDefinition.scheme.toLowerCase();
} else {
let authScheme = null;
}

switch (authType) {
case 'http':
switch(authScheme){
Expand Down

0 comments on commit e4bc522

Please sign in to comment.