mirror of
https://github.com/Redocly/redoc.git
synced 2024-11-11 03:16:48 +03:00
doc styling fixes
This commit is contained in:
parent
a95e866041
commit
9dd93e8895
|
@ -9,20 +9,21 @@ ReDoc makes use of the following [vendor extensions](http://swagger.io/specifica
|
||||||
| :------------- | :-----------: | :---------- |
|
| :------------- | :-----------: | :---------- |
|
||||||
| x-logo | [Logo Object](#logoObject) | The information about API logo |
|
| x-logo | [Logo Object](#logoObject) | The information about API logo |
|
||||||
|
|
||||||
##### Usage in Redoc
|
###### Usage in Redoc
|
||||||
`x-logo` is used to specify API logo. The corresponding image are displayed just above side-menu.
|
`x-logo` is used to specify API logo. The corresponding image are displayed just above side-menu.
|
||||||
|
|
||||||
#### <a name="logoObject"></a>Logo Object
|
#### <a name="logoObject"></a>Logo Object
|
||||||
The information about API logo
|
The information about API logo
|
||||||
##### Fixed fields
|
###### Fixed fields
|
||||||
| Field Name | Type | Description |
|
| Field Name | Type | Description |
|
||||||
| :-------------- | :------: | :---------- |
|
| :-------------- | :------: | :---------- |
|
||||||
| url | string | The URL pointing to the spec logo. MUST be in the format of a URL
|
| url | string | The URL pointing to the spec logo. MUST be in the format of a URL
|
||||||
| backgroundColor | string | background color to be used. MUST be in [CSS color syntax](https://developer.mozilla.org/en/docs/Web/CSS/color) |
|
| backgroundColor | string | background color to be used. MUST be in [CSS color syntax](https://developer.mozilla.org/en/docs/Web/CSS/color) |
|
||||||
|
|
||||||
|
|
||||||
##### x-logo example
|
###### x-logo example
|
||||||
```yaml
|
json
|
||||||
|
```json
|
||||||
{
|
{
|
||||||
"info": {
|
"info": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
|
@ -34,15 +35,14 @@ The information about API logo
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
yaml
|
||||||
```yaml
|
```yaml
|
||||||
{
|
|
||||||
info:
|
info:
|
||||||
version: "1.0.0"
|
version: "1.0.0"
|
||||||
title: "Swagger Petstore"
|
title: "Swagger Petstore"
|
||||||
x-logo:
|
x-logo:
|
||||||
url: "https://rebilly.github.io/ReDoc/petstore-logo.png"
|
url: "https://rebilly.github.io/ReDoc/petstore-logo.png"
|
||||||
backgroundColor: "white"
|
backgroundColor: "white"
|
||||||
}
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
@ -54,11 +54,12 @@ The information about API logo
|
||||||
| :------------- | :------: | :---------- |
|
| :------------- | :------: | :---------- |
|
||||||
| x-traitTag | boolean | In Swagger two operations can have multiply tags. This property distinguish between tags that are used to group operations (default) from tags that are used to mark operation with certain trait (`true` value) |
|
| x-traitTag | boolean | In Swagger two operations can have multiply tags. This property distinguish between tags that are used to group operations (default) from tags that are used to mark operation with certain trait (`true` value) |
|
||||||
|
|
||||||
##### Usage in Redoc
|
###### Usage in Redoc
|
||||||
Tags that have `x-traitTag` set to `true` are listed in side-menu but don't have any subitems (operations). Tag `description` is rendered as well.
|
Tags that have `x-traitTag` set to `true` are listed in side-menu but don't have any subitems (operations). Tag `description` is rendered as well.
|
||||||
This is useful for handling out common things like Pagination, Rate-Limits, etc.
|
This is useful for handling out common things like Pagination, Rate-Limits, etc.
|
||||||
|
|
||||||
##### x-traitTag example
|
###### x-traitTag example
|
||||||
|
json
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"name": "Pagination",
|
"name": "Pagination",
|
||||||
|
@ -66,6 +67,7 @@ This is useful for handling out common things like Pagination, Rate-Limits, etc.
|
||||||
"x-traitTag": true
|
"x-traitTag": true
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
yaml
|
||||||
```yaml
|
```yaml
|
||||||
name: Pagination
|
name: Pagination
|
||||||
description: Pagination description (can use markdown syntax)
|
description: Pagination description (can use markdown syntax)
|
||||||
|
@ -79,28 +81,28 @@ x-traitTag: true
|
||||||
| :------------- | :------: | :---------- |
|
| :------------- | :------: | :---------- |
|
||||||
| x-code-samples | [ [Code Sample Object](#codeSampleObject) ] | A list of code samples associated with operation |
|
| x-code-samples | [ [Code Sample Object](#codeSampleObject) ] | A list of code samples associated with operation |
|
||||||
|
|
||||||
##### Usage in ReDoc
|
###### Usage in ReDoc
|
||||||
x-code-samples are rendered on the right panel of ReDoc
|
`x-code-samples` are rendered on the right panel of ReDoc
|
||||||
|
|
||||||
#### <a name="codeSampleObject"></a>Code Sample Object
|
#### <a name="codeSampleObject"></a>Code Sample Object
|
||||||
Operation code sample
|
Operation code sample
|
||||||
##### Fixed fields
|
###### Fixed fields
|
||||||
| Field Name | Type | Description |
|
| Field Name | Type | Description |
|
||||||
| :---------- | :------: | :----------- |
|
| :---------- | :------: | :----------- |
|
||||||
| lang | string | Code sample language. Value should be one of the following [list](https://github.com/github/linguist/blob/master/lib/linguist/popular.yml) |
|
| lang | string | Code sample language. Value should be one of the following [list](https://github.com/github/linguist/blob/master/lib/linguist/popular.yml) |
|
||||||
| source | string | Code sample source code |
|
| source | string | Code sample source code |
|
||||||
|
|
||||||
|
|
||||||
##### Code Sample Object example
|
###### Code Sample Object example
|
||||||
```yaml
|
json
|
||||||
|
```json
|
||||||
{
|
{
|
||||||
"lang": "JavaScript",
|
"lang": "JavaScript",
|
||||||
"source": "console.log('Hello World');"
|
"source": "console.log('Hello World');"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
yaml
|
||||||
```yaml
|
```yaml
|
||||||
{
|
|
||||||
lang: JavaScript
|
lang: JavaScript
|
||||||
source: console.log('Hello World');
|
source: console.log('Hello World');
|
||||||
}
|
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in New Issue
Block a user