fix: response samples - render description as markdown

fixes #190
This commit is contained in:
Roman Hotsiy 2017-02-14 11:18:59 +02:00
parent 77bc3c44fc
commit 4acfc11148
No known key found for this signature in database
GPG Key ID: 5CB7B3ACABA57CB0
3 changed files with 6 additions and 2 deletions

View File

@ -1,6 +1,6 @@
<header *ngIf="data.responses.length"> Response samples </header>
<tabs *ngIf="data.responses.length">
<tab *ngFor="let response of data.responses" tabTitle="{{response.code}} {{response.description}}"
<tab *ngFor="let response of data.responses" [tabTitle]="response.code + ' ' + response.description | marked"
[tabStatus]="response.type">
<schema-sample [pointer]="response.pointer"></schema-sample>
</tab>

View File

@ -1,5 +1,5 @@
<ul>
<li *ngFor="let tab of tabs" [ngClass]="{active: tab.active}" (click)="selectTab(tab)"
class="tab-{{tab.tabStatus}}">{{tab.tabTitle}}</li>
class="tab-{{tab.tabStatus}}" [innerHTML]="tab.tabTitle"></li>
</ul>
<ng-content></ng-content>

View File

@ -16,6 +16,10 @@ li {
cursor: pointer;
}
li /deep/ .redoc-markdown-block p {
display: inline;
}
.tab-success, .tab-error, .tab-redirect, .tab-info {
&:before {
content: "";