mirror of
https://github.com/Redocly/redoc.git
synced 2024-11-10 19:06:34 +03:00
parent
dd6dfa1f1a
commit
35176b5f67
|
@ -39,6 +39,7 @@ info:
|
|||
termsOfService: 'http://swagger.io/terms/'
|
||||
contact:
|
||||
email: apiteam@swagger.io
|
||||
url: https://github.com/Rebilly/ReDoc
|
||||
x-logo:
|
||||
url: 'https://rebilly.github.io/ReDoc/petstore-logo.png'
|
||||
license:
|
||||
|
|
|
@ -16,13 +16,12 @@ export class ApiLogo extends BaseComponent implements OnInit {
|
|||
}
|
||||
|
||||
init() {
|
||||
let logoInfo = this.componentSchema.info['x-logo'];
|
||||
if ('url' in this.componentSchema.info['contact']) {
|
||||
this.logo.url = this.componentSchema.info['contact']['url'];
|
||||
}
|
||||
const info = this.componentSchema.info;
|
||||
const logoInfo = info['x-logo'];
|
||||
if (!logoInfo) return;
|
||||
this.logo.imgUrl = logoInfo.url;
|
||||
this.logo.bgColor = logoInfo.backgroundColor || 'transparent';
|
||||
this.logo.url = info.contact && info.contact.url || null;
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
|
Loading…
Reference in New Issue
Block a user