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