redoc/lib/components/JsonSchema/json-schema.html

38 lines
1.7 KiB
HTML
Raw Normal View History

<span *ngIf="isTrivial" class="param-wrap">
<span class="param-type param-type-trivial {{type}}"
[ngClass]="{'with-hint': _displayTypeHint}" title="{{_displayTypeHint}}">{{_displayType}}</span>
</span>
2016-01-10 18:29:35 +03:00
<div *ngIf="!isTrivial" class="params-wrap" [ngClass]="{'params-array': isArray}">
<div *ngFor="#prop of data.properties" class="param-wrap">
2016-01-10 18:29:35 +03:00
<div class="param" [ngClass]="{'discriminator': prop.isDiscriminator}">
2015-11-19 00:23:18 +03:00
<div class="param-name">
<span class="param-name-content">{{prop._name}}</span>
2015-11-19 00:23:18 +03:00
</div>
<div class="param-info">
<div>
<span class="param-type {{prop.type}}" [ngClass]="{'with-hint': prop._displayTypeHint}"
title="{{prop._displayTypeHint}}"> {{prop._displayType}} {{prop._displayFormat}}</span>
2016-02-04 12:49:00 +03:00
<span *ngIf="prop.required" class="param-required">Required</span>
2016-02-06 18:00:31 +03:00
<div *ngIf="prop.enum" class="param-enum">
<span *ngFor="#enumItem of prop.enum" class="enum-value {{enumItem.type}}"> {{enumItem.val | json}} </span>
</div>
2015-11-19 00:23:18 +03:00
</div>
<div class="param-description" innerHtml="{{prop.description | marked}}"></div>
2016-01-10 18:29:35 +03:00
<div class="discriminator-info" *ngIf="prop.isDiscriminator"> This field value determines the exact schema: </div>
2015-11-19 00:23:18 +03:00
</div>
</div>
<div class="param-schema" [ngClass]="{'param-array': prop._isArray}" *ngIf="prop._pointer">
<json-schema pointer="{{prop._pointer}}" [isArray]='prop._isArray'>
2015-11-19 00:23:18 +03:00
</json-schema>
</div>
</div>
2016-01-10 18:29:35 +03:00
<div *ngIf="data.derived.length" class="param-wrap">
<tabs>
<tab *ngFor="#derived of data.derived" tabTitle="{{derived.name}}">
2016-01-17 00:24:05 +03:00
<json-schema pointer="{{derived.$ref}}" [final]="derived.final">
2016-01-10 18:29:35 +03:00
</json-schema>
</tab>
</tabs>
</div>
2016-01-09 23:34:44 +03:00
</div>