Skip to content

Commit 15700c7

Browse files
committed
fixes #920 - security-scheme filtering
1 parent 6543292 commit 15700c7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/templates/security-scheme-template.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ export default function securitySchemeTemplate() {
409409
? html`
410410
<table role="presentation" id="auth-table" class='m-table padded-12' style="width:100%;">
411411
${this.resolvedSpec.securitySchemes
412-
.filter((v) => v.scheme && v.type)
412+
.filter((v) => v.type)
413413
.map((v) => html`
414414
<tr id="security-scheme-${v.securitySchemeId}" class="${v.type.toLowerCase()}">
415415
<td style="max-width:500px; overflow-wrap: break-word;">
@@ -431,7 +431,7 @@ export default function securitySchemeTemplate() {
431431
: ''
432432
}
433433
434-
${(v.type.toLowerCase() === 'apikey') || (v.type.toLowerCase() === 'http' && v.scheme.toLowerCase() === 'bearer')
434+
${(v.type.toLowerCase() === 'apikey') || (v.type.toLowerCase() === 'http' && v.scheme?.toLowerCase() === 'bearer')
435435
? html`
436436
<div style="margin-bottom:5px">
437437
${v.type.toLowerCase() === 'apikey'
@@ -453,7 +453,7 @@ export default function securitySchemeTemplate() {
453453
</div>`
454454
: ''
455455
}
456-
${v.type.toLowerCase() === 'http' && v.scheme.toLowerCase() === 'basic'
456+
${v.type.toLowerCase() === 'http' && v.scheme?.toLowerCase() === 'basic'
457457
? html`
458458
<div style="margin-bottom:5px">
459459
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>.

0 commit comments

Comments
 (0)