Add x-nullable to the docs

This commit is contained in:
Roman Hotsiy 2016-08-31 22:45:34 +03:00
parent b2cd855aa8
commit 40c40cd327
No known key found for this signature in database
GPG Key ID: 5CB7B3ACABA57CB0
2 changed files with 11 additions and 0 deletions

View File

@ -99,6 +99,7 @@ ReDoc makes use of the following [vendor extensions](http://swagger.io/specifica
* [`x-logo`](docs/redoc-vendor-extensions.md#x-logo) - is used to specify API logo
* [`x-traitTag`](docs/redoc-vendor-extensions.md#x-traitTag) - useful for handling out common things like Pagination, Rate-Limits, etc
* [`x-code-samples`](docs/redoc-vendor-extensions.md#x-code-samples) - specify operation code samples
* [`x-nullable`](docs/redoc-vendor-extensions.md#nullable) - mark schema param as a nullable
### `<redoc>` tag attributes
* `spec-url` - relative or absolute url to your spec file;

View File

@ -106,3 +106,13 @@ yaml
lang: JavaScript
source: console.log('Hello World');
```
### Schema Object vendor extensions
Extends OpenAPI [Schema Object](http://swagger.io/specification/#schemaObject)
#### x-code-samples
| Field Name | Type | Description |
| :------------- | :------: | :---------- |
| x-nullable | boolean | marks schema as a nullable |
###### Usage in ReDoc
Schemas marked as `x-nullable` are marked in ReDoc with the label Nullable