mirror of
https://github.com/Redocly/redoc.git
synced 2025-06-29 08:43:03 +03:00
parent
b84177c157
commit
f792273be8
|
@ -242,6 +242,7 @@ paths:
|
||||||
in: header
|
in: header
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
|
x-example: Bearer <TOKEN>
|
||||||
- name: petId
|
- name: petId
|
||||||
in: path
|
in: path
|
||||||
description: Pet id to delete
|
description: Pet id to delete
|
||||||
|
|
|
@ -64,7 +64,8 @@ $sub-schema-offset: ($bullet-size / 2) + $bullet-margin;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
.param-type, .param-array-format {
|
.param-type,
|
||||||
|
.param-array-format {
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
line-height: $param-name-height;
|
line-height: $param-name-height;
|
||||||
color: rgba($black, 0.4);
|
color: rgba($black, 0.4);
|
||||||
|
@ -73,7 +74,8 @@ $sub-schema-offset: ($bullet-size / 2) + $bullet-margin;
|
||||||
.param-type {
|
.param-type {
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
&.array::before, &.tuple::before {
|
&.array::before,
|
||||||
|
&.tuple::before {
|
||||||
color: $black;
|
color: $black;
|
||||||
font-weight: $base-font-weight;
|
font-weight: $base-font-weight;
|
||||||
.param-collection-format-multi + & {
|
.param-collection-format-multi + & {
|
||||||
|
@ -144,7 +146,6 @@ $sub-schema-offset: ($bullet-size / 2) + $bullet-margin;
|
||||||
}
|
}
|
||||||
|
|
||||||
.param:first-of-type {
|
.param:first-of-type {
|
||||||
|
|
||||||
> .param-name::before {
|
> .param-name::before {
|
||||||
content: '';
|
content: '';
|
||||||
display: block;
|
display: block;
|
||||||
|
@ -158,7 +159,6 @@ $sub-schema-offset: ($bullet-size / 2) + $bullet-margin;
|
||||||
|
|
||||||
.param:last-of-type,
|
.param:last-of-type,
|
||||||
.param.last {
|
.param.last {
|
||||||
|
|
||||||
> .param-name {
|
> .param-name {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
|
@ -236,14 +236,24 @@ $sub-schema-offset: ($bullet-size / 2) + $bullet-margin;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.param-example {
|
||||||
|
font-size: 0.95em;
|
||||||
|
|
||||||
|
&::before {
|
||||||
|
content: 'Example: ';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.param-enum-value,
|
.param-enum-value,
|
||||||
.param-default-value {
|
.param-default-value,
|
||||||
background-color: $background-color;
|
.param-example-value {
|
||||||
border: 1px solid rgba($secondary-color, 0.2);
|
font-family: Courier, monospace;
|
||||||
|
background-color: rgba($secondary-color, 0.02);
|
||||||
|
border: 1px solid rgba($secondary-color, 0.1);
|
||||||
margin: 2px 3px;
|
margin: 2px 3px;
|
||||||
padding: 0 5px;
|
padding: 0.1em 0.2em 0.2em;
|
||||||
border-radius: 2px;
|
border-radius: $border-radius;
|
||||||
color: $secondary-color;
|
color: $text-color;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
min-width: 20px;
|
min-width: 20px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
|
@ -22,6 +22,9 @@
|
||||||
<div class="param-default" *ngIf="param.default != null">
|
<div class="param-default" *ngIf="param.default != null">
|
||||||
<span class="param-default-value">{{param.default | json}}</span>
|
<span class="param-default-value">{{param.default | json}}</span>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="param-example" *ngIf="param.example != null">
|
||||||
|
<span class="param-example-value">{{param.example | json}}</span>
|
||||||
|
</div>
|
||||||
<div *ngIf="param.enum || param._enumItem" class="param-enum">
|
<div *ngIf="param.enum || param._enumItem" class="param-enum">
|
||||||
<span *ngFor="let enumItem of param.enum" class="param-enum-value {{enumItem.type}}">
|
<span *ngFor="let enumItem of param.enum" class="param-enum-value {{enumItem.type}}">
|
||||||
{{enumItem.val | json}}
|
{{enumItem.val | json}}
|
||||||
|
|
|
@ -275,16 +275,11 @@ footer {
|
||||||
code {
|
code {
|
||||||
font-family: Courier, monospace;
|
font-family: Courier, monospace;
|
||||||
background-color: rgba(38,50,56,0.04);
|
background-color: rgba(38,50,56,0.04);
|
||||||
padding: 0.1em 0 0.2em 0;
|
padding: 0.1em 0.2em 0.2em;
|
||||||
font-size: 1em;
|
font-size: 1em;
|
||||||
border-radius: $border-radius;
|
border-radius: $border-radius;
|
||||||
color: $red;
|
color: $red;
|
||||||
border: 1px solid rgba(38,50,56, 0.1);
|
border: 1px solid rgba(38,50,56, 0.1);
|
||||||
|
|
||||||
&:before, &:after {
|
|
||||||
letter-spacing: -0.2em;
|
|
||||||
//content: "\00a0";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
p:last-of-type {
|
p:last-of-type {
|
||||||
|
|
|
@ -119,6 +119,9 @@ const injectors = {
|
||||||
injectTo._displayType = propertySchema.title ?
|
injectTo._displayType = propertySchema.title ?
|
||||||
`${propertySchema.title} (${propertySchema.type})` : propertySchema.type;
|
`${propertySchema.title} (${propertySchema.type})` : propertySchema.type;
|
||||||
}
|
}
|
||||||
|
if (injectTo['x-example'] && !propertySchema.example) {
|
||||||
|
injectTo.example = propertySchema['x-example'];
|
||||||
|
}
|
||||||
injectTo._widgetType = 'trivial';
|
injectTo._widgetType = 'trivial';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue
Block a user