From 9dd93e88953be7f00e278edbdac050735c66e13a Mon Sep 17 00:00:00 2001 From: Roman Hotsiy Date: Mon, 1 Feb 2016 19:49:57 +0200 Subject: [PATCH] doc styling fixes --- docs/redoc-vendor-extensions.md | 56 +++++++++++++++++---------------- 1 file changed, 29 insertions(+), 27 deletions(-) diff --git a/docs/redoc-vendor-extensions.md b/docs/redoc-vendor-extensions.md index 5ae5b6ec..5a6bee90 100644 --- a/docs/redoc-vendor-extensions.md +++ b/docs/redoc-vendor-extensions.md @@ -1,7 +1,7 @@ # ReDoc vendor extensions ReDoc makes use of the following [vendor extensions](http://swagger.io/specification/#vendorExtensions) -### [Info Object](http://swagger.io/specification/#infoObject) vendor extensions +### [Info Object](http://swagger.io/specification/#infoObject) vendor extensions #### x-logo @@ -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 | -##### Usage in Redoc +###### Usage in Redoc `x-logo` is used to specify API logo. The corresponding image are displayed just above side-menu. -#### Logo Object +#### Logo Object The information about API logo -##### Fixed fields +###### Fixed fields | Field Name | Type | Description | | :-------------- | :------: | :---------- | | 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) | -##### x-logo example -```yaml +###### x-logo example +json +```json { "info": { "version": "1.0.0", @@ -34,15 +35,14 @@ The information about API logo } } ``` +yaml ```yaml -{ - info: - version: "1.0.0" - title: "Swagger Petstore" - x-logo: - url: "https://rebilly.github.io/ReDoc/petstore-logo.png" - backgroundColor: "white" -} +info: + version: "1.0.0" + title: "Swagger Petstore" + x-logo: + url: "https://rebilly.github.io/ReDoc/petstore-logo.png" + 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) | -##### 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. This is useful for handling out common things like Pagination, Rate-Limits, etc. -##### x-traitTag example +###### x-traitTag example +json ```json { "name": "Pagination", @@ -66,6 +67,7 @@ This is useful for handling out common things like Pagination, Rate-Limits, etc. "x-traitTag": true } ``` +yaml ```yaml name: Pagination description: Pagination description (can use markdown syntax) @@ -77,30 +79,30 @@ x-traitTag: true #### x-code-samples | Field Name | Type | Description | | :------------- | :------: | :---------- | -| 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 -x-code-samples are rendered on the right panel of ReDoc +###### Usage in ReDoc +`x-code-samples` are rendered on the right panel of ReDoc -#### Code Sample Object +#### Code Sample Object Operation code sample -##### Fixed fields +###### Fixed fields | 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) | | source | string | Code sample source code | -##### Code Sample Object example -```yaml +###### Code Sample Object example +json +```json { "lang": "JavaScript", "source": "console.log('Hello World');" } ``` +yaml ```yaml -{ - lang: JavaScript - source: console.log('Hello World'); -} +lang: JavaScript +source: console.log('Hello World'); ```