Skip to content

#235 Display operation scopes if defined in security scheme #422

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 23, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/templates/security-scheme-template.js
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ export function pathSecurityTemplate(pathSecurity) {
${orSecurityKeys1.map((orSecurityItem1, i) => html`
${i !== 0 ? html`<div style="padding:3px 4px;"> OR </div>` : ''}
<div class="tooltip">
<div style = "padding:2px 4px; white-space:nowrap; text-overflow:ellipsis;max-width:150px; overflow:hidden;"> ${orSecurityItem1.securityTypes} </div>
<div style = "padding:2px 4px; white-space:nowrap; text-overflow:ellipsis;max-width:150px; overflow:hidden;"><a href="#auth"> ${orSecurityItem1.securityTypes} </a></div>
<div class="tooltip-text" style="position:absolute; color: var(--fg); top:26px; right:0; border:1px solid var(--border-color);padding:2px 4px; display:block;">
${orSecurityItem1.securityDefs.length > 1 ? html`<div>Requires <b>all</b> of the following </div>` : ''}
<div style="padding-left: 8px">
Expand All @@ -404,7 +404,7 @@ export function pathSecurityTemplate(pathSecurity) {
? html`
<div>
${orSecurityItem1.securityDefs.length > 1 ? html`<b>${j + 1}.</b> &nbsp;` : html`Requires`}
OAuth Token (${andSecurityItem.apiKeyId}) in <b>Authorization header</b>
OAuth Token (${andSecurityItem.apiKeyId}) in <b>Authorization header</b>${orSecurityItem1.pathScopes !== '' ? html`. Required scopes: <ul>${orSecurityItem1.pathScopes.split(', ').map((scope) => html`<li>${scope}</li>`)}</ul>` : ''}
</div>`
: andSecurityItem.type === 'http'
? html`
Expand Down