2016-05-16 23:02:23 +03:00
|
|
|
<span *ngIf="schema.isFile" class="param-wrap">
|
|
|
|
<span class="param-file">file</span>
|
|
|
|
<div *ngIf="schema._produces && !isRequestSchema" class="file produces">
|
|
|
|
Produces: {{ schema._produces | json }}
|
|
|
|
</div>
|
|
|
|
<div *ngIf="schema._consumes && isRequestSchema" class="file consume">
|
|
|
|
Consumes: {{ schema._consumes | json }}
|
|
|
|
</div>
|
|
|
|
</span>
|
|
|
|
<span *ngIf="schema.isTrivial && !schema.isFile" class="param-wrap">
|
2016-03-27 01:45:28 +03:00
|
|
|
<span class="param-type param-type-trivial {{schema.type}}"
|
|
|
|
[ngClass]="{'with-hint': schema._displayTypeHint}"
|
|
|
|
title="{{schema._displayTypeHint}}">{{schema._displayType}} {{schema._displayFormat}}
|
|
|
|
<span class="param-range" *ngIf="schema._range"> {{schema._range}} </span>
|
|
|
|
</span>
|
|
|
|
<div *ngIf="schema.enum" class="param-enum">
|
2016-04-29 22:57:24 +03:00
|
|
|
<span *ngFor="let enumItem of schema.enum" class="enum-value {{enumItem.type}}"> {{enumItem.val | json}} </span>
|
2016-03-27 01:45:28 +03:00
|
|
|
</div>
|
2016-01-23 17:01:10 +03:00
|
|
|
</span>
|
2016-03-27 01:45:28 +03:00
|
|
|
<table *ngIf="!schema.isTrivial" class="params-wrap" [ngClass]="{'params-array': schema._isArray}">
|
2016-04-07 20:59:59 +03:00
|
|
|
<!-- <caption> {{_displayType}} </caption> -->
|
2016-04-29 22:57:24 +03:00
|
|
|
<template ngFor [ngForOf]="schema.properties" let-prop="$implicit" let-last="last">
|
2016-04-28 20:17:38 +03:00
|
|
|
<tr class="param" [ngClass]="{'last': last,
|
|
|
|
'discriminator': prop.isDiscriminator && !derivedEmtpy,
|
|
|
|
'complex': prop._pointer,
|
|
|
|
'additional': prop._additional
|
|
|
|
}">
|
2016-03-09 01:27:19 +03:00
|
|
|
<td class="param-name">
|
2016-02-06 19:02:10 +03:00
|
|
|
<span class="param-name-content">{{prop._name}}</span>
|
2016-03-09 01:27:19 +03:00
|
|
|
</td>
|
|
|
|
<td class="param-info">
|
2015-11-19 00:23:18 +03:00
|
|
|
<div>
|
2016-01-23 17:01:10 +03:00
|
|
|
<span class="param-type {{prop.type}}" [ngClass]="{'with-hint': prop._displayTypeHint}"
|
2016-03-17 02:27:09 +03:00
|
|
|
title="{{prop._displayTypeHint}}"> {{prop._displayType}} {{prop._displayFormat}}
|
|
|
|
<span class="param-range" *ngIf="prop._range"> {{prop._range}} </span>
|
|
|
|
</span>
|
2016-02-04 12:49:00 +03:00
|
|
|
<span *ngIf="prop.required" class="param-required">Required</span>
|
2016-05-18 22:24:34 +03:00
|
|
|
<div *ngIf="prop.default">Default: {{prop.default | json}}</div>
|
2016-04-20 22:04:30 +03:00
|
|
|
<div *ngIf="prop.enum && !prop.isDiscriminator" class="param-enum">
|
2016-04-29 22:57:24 +03:00
|
|
|
<span *ngFor="let enumItem of prop.enum" class="enum-value {{enumItem.type}}"> {{enumItem.val | json}} </span>
|
2016-02-06 18:00:31 +03:00
|
|
|
</div>
|
2015-11-19 00:23:18 +03:00
|
|
|
</div>
|
2015-12-14 18:20:40 +03:00
|
|
|
<div class="param-description" innerHtml="{{prop.description | marked}}"></div>
|
2016-03-18 16:06:22 +03:00
|
|
|
<div class="discriminator-info" *ngIf="prop.isDiscriminator">
|
2016-04-13 14:26:59 +03:00
|
|
|
<span>This field value determines the exact schema:</span>
|
2016-06-15 21:48:04 +03:00
|
|
|
<drop-down (change)="selectDerived($event)">
|
2016-04-29 22:57:24 +03:00
|
|
|
<option *ngFor="let derived of schema.derived; let i=index"
|
2016-04-19 18:56:20 +03:00
|
|
|
[value]="i">{{derived.name}}</option>
|
2016-06-15 21:48:04 +03:00
|
|
|
</drop-down>
|
2016-03-18 16:06:22 +03:00
|
|
|
</div>
|
2016-03-09 01:27:19 +03:00
|
|
|
</td>
|
|
|
|
</tr>
|
2016-03-27 01:45:28 +03:00
|
|
|
<tr class="param-schema" [ngClass]="{'param-array': prop._isArray, 'last': last}" *ngIf="prop._pointer">
|
2016-03-09 01:27:19 +03:00
|
|
|
<td colspan="2">
|
2016-04-27 22:34:27 +03:00
|
|
|
<json-schema class="nested-schema" pointer="{{prop._pointer}}" [isArray]='prop._isArray'
|
2016-05-16 23:02:23 +03:00
|
|
|
[nestOdd]="!nestOdd" [isRequestSchema]="isRequestSchema" [attr.nesteven]="!nestOdd">
|
2016-01-10 18:29:35 +03:00
|
|
|
</json-schema>
|
2016-03-09 01:27:19 +03:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</template>
|
2016-04-13 15:46:41 +03:00
|
|
|
<tr *ngIf="schema.derived.length" class="param-wrap discriminator-wrap" [ngClass]="{'empty': derivedEmtpy}">
|
2016-03-09 01:27:19 +03:00
|
|
|
<td colspan="2">
|
2016-04-29 22:57:24 +03:00
|
|
|
<div class="derived-schema" *ngFor="let derived of schema.derived" [ngClass]="{active: derived.active}">
|
2016-04-27 22:34:27 +03:00
|
|
|
<json-schema class="discriminator-part" *ngIf="!derived.empty" [childFor]="pointer"
|
2016-05-16 23:02:23 +03:00
|
|
|
pointer="{{derived.$ref}}" [final]="derived.final" [isRequestSchema]="isRequestSchema">
|
2016-03-18 16:06:22 +03:00
|
|
|
</json-schema>
|
|
|
|
</div>
|
2016-03-09 01:27:19 +03:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|