mirror of
https://github.com/Redocly/redoc.git
synced 2024-11-22 16:46:34 +03:00
Render pattern property (#42)
This commit is contained in:
parent
9d4a903ef2
commit
77eeb53a48
|
@ -193,6 +193,20 @@ $sub-schema-offset: ($bullet-size / 2) + $bullet-margin;
|
|||
}
|
||||
}
|
||||
|
||||
.param-pattern {
|
||||
color: $nullable-color;
|
||||
white-space: nowrap;
|
||||
|
||||
&::before,
|
||||
&::after {
|
||||
content: '/';
|
||||
margin: 0 3px;
|
||||
font-size: 1.2em;
|
||||
font-weight: bold;
|
||||
vertical-align: bottom;
|
||||
}
|
||||
}
|
||||
|
||||
.param-default {
|
||||
font-size: 0.95em;
|
||||
|
||||
|
|
|
@ -23,8 +23,9 @@
|
|||
</span>
|
||||
<span *ngIf="schema['x-nullable']" class="param-nullable">Nullable</span>
|
||||
<div *ngIf="schema.enum" class="param-enum">
|
||||
<span *ngFor="let enumItem of schema.enum" class="enum-value {{enumItem.type}}"> {{enumItem.val | json}} </span>
|
||||
<span *ngFor="let enumItem of schema.enum" class="param-enum-value {{enumItem.type}}"> {{enumItem.val | json}} </span>
|
||||
</div>
|
||||
<span *ngIf="schema.pattern" class="param-pattern">{{schema.pattern}}</span>
|
||||
</span>
|
||||
</template>
|
||||
<template ngSwitchCase="tuple">
|
||||
|
@ -78,6 +79,7 @@
|
|||
<div *ngIf="prop.enum && !prop.isDiscriminator" class="param-enum">
|
||||
<span *ngFor="let enumItem of prop.enum" class="param-enum-value {{enumItem.type}}"> {{enumItem.val | json}} </span>
|
||||
</div>
|
||||
<span *ngIf="prop.pattern" class="param-pattern">{{prop.pattern}}</span>
|
||||
</div>
|
||||
<div class="param-description" [innerHtml]="prop.description | marked"></div>
|
||||
<div class="discriminator-info" *ngIf="prop.isDiscriminator">
|
||||
|
|
|
@ -16,10 +16,13 @@
|
|||
title="{{param._displayTypeHint}}"> {{param._displayType}} {{param._displayFormat}}</span>
|
||||
<span class="param-range" *ngIf="param._range"> {{param._range}} </span>
|
||||
<span *ngIf="param.required" class="param-required">Required</span>
|
||||
<div class="param-default" *ngIf="param.default != null">{{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 class="param-default" *ngIf="param.default != null">
|
||||
<span class="param-default-value">{{param.default | json}}</span>
|
||||
</div>
|
||||
<div *ngIf="param.enum" class="param-enum">
|
||||
<span *ngFor="let enumItem of param.enum" class="param-enum-value {{enumItem.type}}"> {{enumItem.val | json}} </span>
|
||||
</div>
|
||||
<span *ngIf="param.pattern" class="param-pattern">{{param.pattern}}</span>
|
||||
</div>
|
||||
<div class="param-description" [innerHtml]="param.description | marked"></div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue
Block a user