diff --git a/lib/components/ApiInfo/api-info.html b/lib/components/ApiInfo/api-info.html index b13a3b75..e11178c8 100644 --- a/lib/components/ApiInfo/api-info.html +++ b/lib/components/ApiInfo/api-info.html @@ -16,6 +16,7 @@ {{info.license.name}} {{info.license.name}} +

diff --git a/lib/components/ExternalDocs/external-docs.ts b/lib/components/ExternalDocs/external-docs.ts new file mode 100644 index 00000000..08871cf7 --- /dev/null +++ b/lib/components/ExternalDocs/external-docs.ts @@ -0,0 +1,18 @@ +'use strict'; +import { Component, Input, ChangeDetectionStrategy, OnInit } from '@angular/core'; +import { BaseComponent, SpecManager } from '../base'; + +@Component({ + selector: 'redoc-externalDocs', + template: ``, + changeDetection: ChangeDetectionStrategy.OnPush +}) +export class ExternalDocs implements OnInit { + @Input() docs; + + ngOnInit() { + if (this.docs && !this.docs.description) { + this.docs.description = 'External Docs'; + } + } +} diff --git a/lib/components/Method/method.html b/lib/components/Method/method.html index d9b1afe6..c031ca74 100644 --- a/lib/components/Method/method.html +++ b/lib/components/Method/method.html @@ -9,6 +9,7 @@

+ diff --git a/lib/components/Method/method.ts b/lib/components/Method/method.ts index 7067b4c8..852290bb 100644 --- a/lib/components/Method/method.ts +++ b/lib/components/Method/method.ts @@ -17,6 +17,10 @@ interface MethodInfo { bodyParam: any; summary: any; anchor: any; + externalDocs: { + url: string; + description?: string; + } } @Component({ @@ -50,7 +54,8 @@ export class Method extends BaseComponent implements OnInit { bodyParam: this.findBodyParam(), summary: SchemaHelper.methodSummary(this.componentSchema), apiUrl: this.getBaseUrl(), - anchor: this.buildAnchor() + anchor: this.buildAnchor(), + externalDocs: this.componentSchema.externalDocs }; } diff --git a/lib/components/MethodsList/methods-list.html b/lib/components/MethodsList/methods-list.html index 18a833c8..7daccd7c 100644 --- a/lib/components/MethodsList/methods-list.html +++ b/lib/components/MethodsList/methods-list.html @@ -3,6 +3,7 @@

{{tag.name}}

+