Skip to content

Commit

Permalink
Merge pull request #252 from zlondrej/release/2.2
Browse files Browse the repository at this point in the history
Allow setting keys for any security scheme
  • Loading branch information
wparad committed May 22, 2024
2 parents 7245798 + ffd0fce commit 8113a40
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/openapi-explorer.js
Original file line number Diff line number Diff line change
Expand Up @@ -367,8 +367,6 @@ export default class OpenApiExplorer extends LitElement {
authorizationToken = `Basic ${btoa(authorizationToken)}`;
} else if (authorizationToken && securityObj.scheme && securityObj.scheme.toLowerCase() === 'bearer') {
authorizationToken = `Bearer ${authorizationToken}`;
} else {
authorizationToken = null;
}

securityObj.clientId = clientId && clientId.trim();
Expand Down Expand Up @@ -409,7 +407,7 @@ export default class OpenApiExplorer extends LitElement {
expandAndGotoOperation(elementId) {
// Expand full operation and tag
let isExpandingNeeded = false;

const tag = this.resolvedSpec.tags.find(t => t.paths && t.paths.find(p => p.elementId === elementId));
const path = tag?.paths?.find((p) => p.elementId === elementId);
if (path && (!path.expanded || !tag.expanded)) {
Expand Down

0 comments on commit 8113a40

Please sign in to comment.