From 435693451456b281643bc6b3170357ae9126b4da Mon Sep 17 00:00:00 2001 From: Alex Varchuk Date: Wed, 15 Jan 2025 17:09:13 +0100 Subject: [PATCH] docs: move downloadFileName and downloadDefinitionUrl to deprecated options --- docs/config.md | 8 ++++ docs/redoc-vendor-extensions.md | 82 --------------------------------- 2 files changed, 8 insertions(+), 82 deletions(-) diff --git a/docs/config.md b/docs/config.md index 47229823..b7bc0982 100644 --- a/docs/config.md +++ b/docs/config.md @@ -92,6 +92,14 @@ Set the URLs used to download the OpenAPI description or other documentation rel Hides the 'Download' button for saving the API definition source file. **This setting does not make the API definition private**; it just hides the button. +### downloadFileName + +Sets the filename for the downloaded API definition source file. + +### downloadDefinitionUrl + +Sets the URL for the downloaded API definition source file. + ### requiredPropsFirst Shows required properties in schemas first, ordered in the same order as in the required array. diff --git a/docs/redoc-vendor-extensions.md b/docs/redoc-vendor-extensions.md index 792eeefb..3a26fb8c 100644 --- a/docs/redoc-vendor-extensions.md +++ b/docs/redoc-vendor-extensions.md @@ -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) - [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.