redoc/lib/components/ParamsList/params-list.html
2016-06-22 12:45:03 +03:00

39 lines
1.6 KiB
HTML

<h5 class="param-list-header" *ngIf="data.params.length"> Parameters </h5>
<template ngFor [ngForOf]="data.params" let-paramType="$implicit">
<header class="paramType">
{{paramType.place}} Parameters
<span class="hint--top-right hint--large" [attr.data-hint]="paramType.placeHint">?</span>
</header>
<br>
<div class="params-wrap">
<div *ngFor="let param of paramType.params" class="param">
<div class="param-name">
<span class="param-name-content"> {{param.name}} </span>
</div>
<div class="param-info">
<div>
<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>
</div>
<div class="param-description" [innerHtml]="param.description | marked"></div>
</div>
</div>
</div>
</template>
<div *ngIf="data.bodyParam">
<h5 class="param-list-header" *ngIf="data.bodyParam"> Request Body </h5>
<div class="body-param-description" [innerHtml]="data.bodyParam.description | marked"></div>
<div>
<br>
<json-schema-lazy [isRequestSchema]="true" [auto]="true" pointer="{{data.bodyParam.pointer}}/schema">
</json-schema-lazy>
</div>
</div>