-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: update options for future major release
- Loading branch information
1 parent
59ee73f
commit 38e109e
Showing
4 changed files
with
2 additions
and
173 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,9 +10,6 @@ You can use the following [vendor extensions](https://redocly.com/docs/openapi-v | |
- [Tag Group Object](#tag-group-object) | ||
- [Fixed fields](#fixed-fields) | ||
- [x-tagGroups example](#x-taggroups-example) | ||
- [x-ignoredHeaderParameters](#x-ignoredheaderparameters) | ||
- [How to use with Redoc](#how-to-use-with-redoc-1) | ||
- [x-ignoredHeaderParameters example](#x-ignoredheaderparameters-example) | ||
- [Info Object](#info-object) | ||
- [x-logo](#x-logo) | ||
- [How to use with Redoc](#how-to-use-with-redoc-2) | ||
|
@@ -39,9 +36,6 @@ You can use the following [vendor extensions](https://redocly.com/docs/openapi-v | |
- [Schema Object](#schema-object) | ||
- [x-nullable](#x-nullable) | ||
- [How to use with Redoc](#how-to-use-with-redoc-7) | ||
- [x-extendedDiscriminator](#x-extendeddiscriminator) | ||
- [How to use with Redoc](#how-to-use-with-redoc-8) | ||
- [x-extendedDiscriminator example](#x-extendeddiscriminator-example) | ||
- [x-additionalPropertiesName](#x-additionalpropertiesname) | ||
- [How to use with Redoc](#how-to-use-with-redoc-9) | ||
Check failure on line 40 in docs/redoc-vendor-extensions.md GitHub Actions / markdownlintLink fragments should be valid
|
||
- [x-additionalPropertiesName example](#x-additionalpropertiesname-example) | ||
|
@@ -105,29 +99,6 @@ x-tagGroups: | |
- Secondary Stats | ||
``` | ||
### x-ignoredHeaderParameters | ||
| Field Name | Type | Description | | ||
| :-------------------------- | :-----------: | :---------- | | ||
| x-ignoredHeaderParameters | [ string ] | A list of ignored headers | | ||
#### How to use with Redoc | ||
Use `x-ignoredHeaderParameters` to specify header parameter names which are ignored by Redoc. | ||
|
||
#### x-ignoredHeaderParameters example | ||
```yaml | ||
swagger: '2.0' | ||
info: | ||
... | ||
tags: [...] | ||
x-ignoredHeaderParameters: | ||
- Accept | ||
- User-Agent | ||
- X-Test-Header | ||
``` | ||
|
||
## Info Object | ||
Extends the OpenAPI [Info Object](https://redocly.com/docs/openapi-visual-reference/info/) | ||
|
@@ -290,59 +261,6 @@ Extends the OpenAPI [Schema Object](https://redocly.com/docs/openapi-visual-refe | |
#### How to use with Redoc | ||
Schemas marked as `x-nullable` are marked in Redoc with the label Nullable. | ||
|
||
### x-extendedDiscriminator | ||
**ATTENTION**: This is a Redoc-specific vendor extension, and is not supported by other tools. | ||
|
||
| Field Name | Type | Description | | ||
| :------------- | :------: | :---------- | | ||
| x-extendedDiscriminator | string | specifies extended discriminator | | ||
|
||
#### How to use with Redoc | ||
Redoc uses this vendor extension to solve name-clash issues with the standard `discriminator`. | ||
Value of this field specifies the field which is used as an extended discriminator. | ||
Redoc displays definition with selectpicker using which user can select value of the `x-extendedDiscriminator`-marked field. | ||
Redoc displays the definition derived from the current (using `allOf`) and has `enum` with only one value which is the same as the selected value of the field specified as `x-extendedDiscriminator`. | ||
|
||
#### x-extendedDiscriminator example | ||
|
||
```yaml | ||
Payment: | ||
x-extendedDiscriminator: type | ||
type: object | ||
required: | ||
- type | ||
properties: | ||
type: | ||
type: string | ||
name: | ||
type: string | ||
CashPayment: | ||
allOf: | ||
- $ref: "#/definitions/Payment" | ||
- properties: | ||
type: | ||
type: string | ||
enum: | ||
- cash | ||
currency: | ||
type: string | ||
PayPalPayment: | ||
allOf: | ||
- $ref: "#/definitions/Payment" | ||
- properties: | ||
type: | ||
type: string | ||
enum: | ||
- paypal | ||
userEmail: | ||
type: string | ||
``` | ||
|
||
In the example above, the names of definitions (`PayPalPayment`) are named differently than names in the payload (`paypal`) which is not supported by default `discriminator`. | ||
|
||
### x-additionalPropertiesName | ||
**Attention**: This is a Redoc-specific vendor extension, and is not supported by other tools. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters