Default values (only for primitive types)

This commit is contained in:
Roman Hotsiy 2016-05-18 22:24:34 +03:00
parent fde3dccf62
commit 269f535d7f
3 changed files with 3 additions and 0 deletions

View File

@ -35,6 +35,7 @@
<span class="param-range" *ngIf="prop._range"> {{prop._range}} </span>
</span>
<span *ngIf="prop.required" class="param-required">Required</span>
<div *ngIf="prop.default">Default: {{prop.default | json}}</div>
<div *ngIf="prop.enum && !prop.isDiscriminator" class="param-enum">
<span *ngFor="let enumItem of prop.enum" class="enum-value {{enumItem.type}}"> {{enumItem.val | json}} </span>
</div>

View File

@ -15,6 +15,7 @@
<span class="param-type {{param.type}}" [ngClass]="{'with-hint': param._displayTypeHint}"
title="{{param._displayTypeHint}}"> {{param._displayType}} {{param._displayFormat}}</span>
<span *ngIf="param.required" class="param-required">Required</span>
<div class="default" *ngIf="param.default">Default: {{param.default | json}}</div>
<div *ngIf="param.enum" class="param-enum">
<span *ngFor="let enumItem of param.enum" class="enum-value {{enumItem.type}}"> {{enumItem.val | json}} </span>
</div>

View File

@ -8,6 +8,7 @@
<div class="header" *ngFor="let header of response.headers">
<div class="header-name"> {{header.name}} </div>
<div class="header-type"> {{header.type}} </div>
<div *ngIf="header.default" class="header-default"> Default: {{header.default}} </div>
<div class="header-description" innerHtml="{{header.description | marked}}"> </div>
</div>
</div>