mirror of
https://github.com/Redocly/redoc.git
synced 2025-08-10 07:04:51 +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 {
|
export interface SecurityScheme extends OpenAPISecurityScheme {
|
||||||
id: string;
|
id: string;
|
||||||
sectionId: string;
|
sectionId: string;
|
||||||
|
displayName: string;
|
||||||
scopes: string[];
|
scopes: string[];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -23,11 +24,13 @@ export class SecurityRequirementModel {
|
||||||
console.warn(`Non existing security scheme referenced: ${id}. Skipping`);
|
console.warn(`Non existing security scheme referenced: ${id}. Skipping`);
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
const displayName = scheme['x-displayName'] || id;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
...scheme,
|
...scheme,
|
||||||
id,
|
id,
|
||||||
sectionId: SECURITY_SCHEMES_SECTION_PREFIX + id,
|
sectionId: SECURITY_SCHEMES_SECTION_PREFIX + id,
|
||||||
|
displayName,
|
||||||
scopes,
|
scopes,
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue
Block a user