mirror of
https://github.com/Redocly/redoc.git
synced 2024-11-26 02:23:43 +03:00
support "x-nullable" property
This commit is contained in:
parent
22eff033e3
commit
027cdc19c8
|
@ -819,6 +819,7 @@ definitions:
|
||||||
type: string
|
type: string
|
||||||
pattern: "^\\+(?:[0-9]-?){6,14}[0-9]$"
|
pattern: "^\\+(?:[0-9]-?){6,14}[0-9]$"
|
||||||
example: +1-202-555-0192
|
example: +1-202-555-0192
|
||||||
|
x-nullable: true
|
||||||
userStatus:
|
userStatus:
|
||||||
description: User status
|
description: User status
|
||||||
type: integer
|
type: integer
|
||||||
|
|
|
@ -63,6 +63,14 @@ $sub-schema-offset: ($bullet-size / 2) + $bullet-margin;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.param-nullable {
|
||||||
|
vertical-align: middle;
|
||||||
|
line-height: $param-name-height;
|
||||||
|
color: #3195a6;
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
.param-type {
|
.param-type {
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
line-height: $param-name-height;
|
line-height: $param-name-height;
|
||||||
|
|
|
@ -70,6 +70,7 @@
|
||||||
<span class="param-range" *ngIf="prop._range"> {{prop._range}} </span>
|
<span class="param-range" *ngIf="prop._range"> {{prop._range}} </span>
|
||||||
</span>
|
</span>
|
||||||
<span *ngIf="prop._required" class="param-required">Required</span>
|
<span *ngIf="prop._required" class="param-required">Required</span>
|
||||||
|
<span *ngIf="prop._nullable" class="param-nullable">Nullable</span>
|
||||||
<div *ngIf="prop.default">Default: {{prop.default | json}}</div>
|
<div *ngIf="prop.default">Default: {{prop.default | json}}</div>
|
||||||
<div *ngIf="prop.enum && !prop.isDiscriminator" class="param-enum">
|
<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>
|
<span *ngFor="let enumItem of prop.enum" class="enum-value {{enumItem.type}}"> {{enumItem.val | json}} </span>
|
||||||
|
|
|
@ -229,6 +229,7 @@ export class SchemaHelper {
|
||||||
propertySchema._pointer = null;
|
propertySchema._pointer = null;
|
||||||
}
|
}
|
||||||
propertySchema._required = !!requiredMap[propName];
|
propertySchema._required = !!requiredMap[propName];
|
||||||
|
propertySchema._nullable = !!propertySchema['x-nullable'];
|
||||||
propertySchema.isDiscriminator = (schema.discriminator === propName);
|
propertySchema.isDiscriminator = (schema.discriminator === propName);
|
||||||
return propertySchema;
|
return propertySchema;
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue
Block a user