mirror of
https://github.com/Redocly/redoc.git
synced 2025-08-07 13:44:54 +03:00
show security displayName
This commit is contained in:
parent
4f2f2b8479
commit
92e27b39e1
|
@ -5,6 +5,7 @@ import { OpenAPIParser } from '../OpenAPIParser';
|
|||
export interface SecurityScheme extends OpenAPISecurityScheme {
|
||||
id: string;
|
||||
sectionId: string;
|
||||
displayName: string;
|
||||
scopes: string[];
|
||||
}
|
||||
|
||||
|
@ -23,11 +24,13 @@ export class SecurityRequirementModel {
|
|||
console.warn(`Non existing security scheme referenced: ${id}. Skipping`);
|
||||
return undefined;
|
||||
}
|
||||
|
||||
const displayName = scheme['x-displayName'] || id;
|
||||
|
||||
return {
|
||||
...scheme,
|
||||
id,
|
||||
sectionId: SECURITY_SCHEMES_SECTION_PREFIX + id,
|
||||
displayName,
|
||||
scopes,
|
||||
};
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue
Block a user