Merge commit 'e39bdc244d0bf4c542124e3a6cad742b229ca4ff' into releases

This commit is contained in:
RedocBot 2017-08-28 10:51:58 +00:00 committed by travis@localhost
commit ca6ad0e5e7
5 changed files with 15 additions and 6 deletions

View File

@ -1,3 +1,12 @@
<a name="1.18.1"></a>
## [1.18.1](https://github.com/Rebilly/ReDoc/compare/v1.17.0...v1.18.1) (2017-08-28)
### Bug Fixes
* crash if `contact` is not in the spec ([1b9ba0d](https://github.com/Rebilly/ReDoc/commit/1b9ba0d)), closes [#332](https://github.com/Rebilly/ReDoc/issues/332)
<a name="1.18.0"></a> <a name="1.18.0"></a>
# [1.18.0](https://github.com/Rebilly/ReDoc/compare/v1.16.1...v1.18.0) (2017-08-28) # [1.18.0](https://github.com/Rebilly/ReDoc/compare/v1.16.1...v1.18.0) (2017-08-28)

View File

@ -14,7 +14,7 @@
## [Live demo](http://rebilly.github.io/ReDoc/) ## [Live demo](http://rebilly.github.io/ReDoc/)
[<img src="http://i.imgur.com/XWLWJvl.png" width="250">](https://github.com/Rebilly/generator-openapi-repo#generator-openapi-repo--) [<img alt="Deploy to Github" src="http://i.imgur.com/YZmaqk3.png" height="60px">](https://github.com/Rebilly/generator-openapi-repo#generator-openapi-repo--) [<img alt="ReDoc as a service" src="http://i.imgur.com/edqdCv6.png" height="60px">](https://redoc.ly) [<img alt="Customization services" src="http://i.imgur.com/c4sUF7M.png" height="60px">](https://redoc.ly/#services)
## Features ## Features
- Extremely easy deployment - Extremely easy deployment

View File

@ -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:

View File

@ -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() {

View File

@ -1,7 +1,7 @@
{ {
"name": "redoc", "name": "redoc",
"description": "Swagger-generated API Reference Documentation", "description": "Swagger-generated API Reference Documentation",
"version": "1.18.0", "version": "1.18.1",
"repository": { "repository": {
"type": "git", "type": "git",
"url": "git://github.com/Rebilly/ReDoc" "url": "git://github.com/Rebilly/ReDoc"