Skip to content

Commit

Permalink
fixes #920 - security-scheme filtering
Browse files Browse the repository at this point in the history
  • Loading branch information
mrin9 committed Oct 6, 2024
1 parent 6543292 commit 15700c7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/templates/security-scheme-template.js
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ export default function securitySchemeTemplate() {
? html`
<table role="presentation" id="auth-table" class='m-table padded-12' style="width:100%;">
${this.resolvedSpec.securitySchemes
.filter((v) => v.scheme && v.type)
.filter((v) => v.type)
.map((v) => html`
<tr id="security-scheme-${v.securitySchemeId}" class="${v.type.toLowerCase()}">
<td style="max-width:500px; overflow-wrap: break-word;">
Expand All @@ -431,7 +431,7 @@ export default function securitySchemeTemplate() {
: ''
}
${(v.type.toLowerCase() === 'apikey') || (v.type.toLowerCase() === 'http' && v.scheme.toLowerCase() === 'bearer')
${(v.type.toLowerCase() === 'apikey') || (v.type.toLowerCase() === 'http' && v.scheme?.toLowerCase() === 'bearer')
? html`
<div style="margin-bottom:5px">
${v.type.toLowerCase() === 'apikey'
Expand All @@ -453,7 +453,7 @@ export default function securitySchemeTemplate() {
</div>`
: ''
}
${v.type.toLowerCase() === 'http' && v.scheme.toLowerCase() === 'basic'
${v.type.toLowerCase() === 'http' && v.scheme?.toLowerCase() === 'basic'
? html`
<div style="margin-bottom:5px">
Send <code>Authorization</code> in <code>header</code> containing the word <code>Basic</code> followed by a space and a base64 encoded string of <code>username:password</code>.
Expand Down

0 comments on commit 15700c7

Please sign in to comment.