Skip to content

Commit ae1ae79

Browse files
authored
docs: update options for future major release (#2646)
1 parent 153ec7a commit ae1ae79

File tree

5 files changed

+135
-144
lines changed

5 files changed

+135
-144
lines changed

README.md

-2
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,8 @@ Redoc uses the following [specification extensions](https://redocly.com/docs/api
122122
* [`x-displayName`](docs/redoc-vendor-extensions.md#x-displayname) - specify human-friendly names for the menu categories
123123
* [`x-tagGroups`](docs/redoc-vendor-extensions.md#x-tagGroups) - group tags by categories in the side menu
124124
* [`x-servers`](docs/redoc-vendor-extensions.md#x-servers) - ability to specify different servers for API (backported from OpenAPI 3.0)
125-
* [`x-ignoredHeaderParameters`](docs/redoc-vendor-extensions.md#x-ignoredHeaderParameters) - ability to specify header parameter names to ignore
126125
* [`x-additionalPropertiesName`](docs/redoc-vendor-extensions.md#x-additionalPropertiesName) - ability to supply a descriptive name for the additional property keys
127126
* [`x-summary`](docs/redoc-vendor-extensions.md#x-summary) - for Response object, use as the response button text, with description rendered under the button
128-
* [`x-extendedDiscriminator`](docs/redoc-vendor-extensions.md#x-extendedDiscriminator) - in Schemas, uses this to solve name-clash issues with the standard discriminator
129127
* [`x-explicitMappingOnly`](docs/redoc-vendor-extensions.md#x-explicitMappingOnly) - in Schemas, display a more descriptive property name in objects with additionalProperties when viewing the property list with an object
130128

131129
## Releases

docs/config.md

+102-57
Original file line numberDiff line numberDiff line change
@@ -26,111 +26,158 @@ Sets the minimum amount of characters that need to be typed into the search dial
2626

2727
_Default: 3_
2828

29-
### expandDefaultServerVariables
30-
31-
Enables or disables expanding default server variables.
29+
### hideDownloadButtons
3230

33-
### expandResponses
31+
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.
3432

35-
Controls which responses to expand by default. Specify one or more responses by providing their response codes as a comma-separated list without spaces, for example `expandResponses='200,201'`. Special value 'all' expands all responses by default. Be careful: this option can slow down documentation rendering time.
33+
### hideLoading
3634

37-
### expandSingleSchemaField
35+
Hides the loading animation. Does not apply to CLI or Workflows-rendered docs.
3836

39-
Automatically expands the single field in a schema.
37+
### hideSchemaTitles
4038

41-
### hideDownloadButton
39+
Hides the schema title next to to the type.
4240

43-
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.
41+
### jsonSamplesExpandLevel
4442

45-
### hideHostname
43+
Sets the default expand level for JSON payload samples (response and request body). The default value is 2, and the maximum supported value is '+Infinity'. It can also be configured as a string with the special value `all` that expands all levels.
4644

47-
If set to `true`, the protocol and hostname are not shown in the operation definition.
45+
_Default: 2_
4846

49-
### hideLoading
47+
### maxDisplayedEnumValues
5048

51-
Hides the loading animation. Does not apply to CLI or Workflows-rendered docs.
49+
Displays only the specified number of enum values. The remaining values are hidden in an expandable area. If not set, all values are displayed.
5250

53-
### hideRequestPayloadSample
51+
### onlyRequiredInSamples
5452

55-
Hides request payload examples.
53+
Shows only required fields in request samples.
5654

57-
### hideOneOfDescription
55+
### sortRequiredPropsFirst
5856

59-
If set to `true`, the description for `oneOf`/`anyOf` object is not shown in the schema.
57+
Shows required properties in schemas first, ordered in the same order as in the required array.
6058

61-
### hideSchemaPattern
59+
### schemasExpansionLevel
6260

63-
If set to `true`, the pattern is not shown in the schema.
61+
Specifies whether to automatically expand schemas in Reference docs. Set it to `all` to expand all schemas regardless of their level, or set it to a number to expand schemas up to the specified level. For example, `schemasExpansionLevel: 3` expands schemas up to three levels deep. The default value is `0`, meaning no schemas are expanded automatically.
6462

65-
### hideSchemaTitles
63+
### scrollYOffset
6664

67-
Hides the schema title next to to the type.
65+
Specifies a vertical scroll-offset.
66+
This setting is useful when there are fixed positioned elements at the top of the page, such as navbars, headers, etc.
6867

69-
### hideSecuritySection
68+
Note that you can specify the `scrollYOffset` value in any of the following ways:
69+
- as a number - a fixed number of pixels to be used as the offset.
70+
- as a CSS selector - the selector of the element to be used for specifying the offset. The distance from the top of the page to the element's bottom is used as the offset.
71+
- a function (advanced) - a getter function. Must return a number representing the offset (in pixels).
7072

71-
Hides the Security panel section.
73+
### showExtensions
7274

73-
### hideSingleRequestSampleTab
75+
Shows specification extensions ('x-' fields). Extensions used by Redoc are ignored. The value can be boolean or an array of strings with names of extensions to display. When used as boolean and set to `true`, all specification extensions are shown.
7476

75-
Hides the request sample tab for requests with only one sample.
77+
### sanitize
7678

77-
### htmlTemplate
79+
If set to `true`, the API definition is considered untrusted and all HTML/Markdown is sanitized to prevent XSS.
7880

79-
Sets the path to the optional HTML file used to modify the layout of the reference docs page.
81+
### downloadUrls
8082

81-
### jsonSampleExpandLevel
83+
Set the URLs used to download the OpenAPI description or other documentation related files from the API documentation page.
8284

83-
Sets the default expand level for JSON payload samples (response and request body). The default value is 2, and the maximum supported value is '+Infinity'. It can also be configured as a string with the special value `all` that expands all levels.
85+
### schemaDefinitionsTagName
8486

85-
_Default: 2_
87+
If a value is set, all of the schemas are rendered with the designated tag name. The schemas then render and display in the sidebar navigation (with that associated tag name).
8688

87-
### maxDisplayedEnumValues
89+
### generatedSamplesMaxDepth
8890

89-
Displays only the specified number of enum values. The remaining values are hidden in an expandable area. If not set, all values are displayed.
91+
The generatedSamplesMaxDepth option controls how many schema levels automatically generated for payload samples. The default is 8 which works well for most APIs, but you can adjust it if necessary for your use case.
9092

91-
### menuToggle
93+
### hidePropertiesPrefix
9294

93-
If set to `true`, selecting an expanded item in the sidebar twice collapses it.
95+
In complex data structures or object schemas where properties are nested within parent objects the hidePropertiesPrefix option enables the hiding of parent names for nested properties within the documentation.
9496

9597
_Default: true_
9698

97-
### nativeScrollbars
98-
99-
If set to `true`, the sidebar uses the native scrollbar instead of perfect-scroll. This setting is a scrolling performance optimization for big API definitions.
99+
## Deprecated Functional settings
100100

101-
### onlyRequiredInSamples
101+
### hideDownloadButton
102102

103-
Shows only required fields in request samples.
103+
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.
104104

105-
### pathInMiddlePanel
105+
### downloadFileName
106106

107-
Shows the path link and HTTP verb in the middle panel instead of the right panel.
107+
Sets the filename for the downloaded API definition source file.
108108

109-
### payloadSampleIdx
109+
### downloadDefinitionUrl
110110

111-
If set, the payload sample is inserted at the specified index. If there are `N` payload samples and the value configured here is bigger than `N`, the payload sample is inserted last. Indexes start from 0.
111+
Sets the URL for the downloaded API definition source file.
112112

113113
### requiredPropsFirst
114114

115115
Shows required properties in schemas first, ordered in the same order as in the required array.
116116

117+
### jsonSampleExpandLevel
118+
119+
Sets the default expand level for JSON payload samples (response and request body). The default value is 2, and the maximum supported value is '+Infinity'. It can also be configured as a string with the special value `all` that expands all levels.
120+
121+
_Default: 2_
122+
117123
### schemaExpansionLevel
118124

119125
Specifies whether to automatically expand schemas in Reference docs. Set it to `all` to expand all schemas regardless of their level, or set it to a number to expand schemas up to the specified level. For example, `schemaExpansionLevel: 3` expands schemas up to three levels deep. The default value is `0`, meaning no schemas are expanded automatically.
120126

121-
### scrollYOffset
122127

123-
Specifies a vertical scroll-offset.
124-
This setting is useful when there are fixed positioned elements at the top of the page, such as navbars, headers, etc.
128+
### expandDefaultServerVariables
125129

126-
Note that you can specify the `scrollYOffset` value in any of the following ways:
127-
- as a number - a fixed number of pixels to be used as the offset.
128-
- as a CSS selector - the selector of the element to be used for specifying the offset. The distance from the top of the page to the element's bottom is used as the offset.
129-
- a function (advanced) - a getter function. Must return a number representing the offset (in pixels).
130+
Enables or disables expanding default server variables.
130131

131-
### showExtensions
132+
### expandResponses
132133

133-
Shows specification extensions ('x-' fields). Extensions used by Redoc are ignored. The value can be boolean or an array of strings with names of extensions to display. When used as boolean and set to `true`, all specification extensions are shown.
134+
Controls which responses to expand by default. Specify one or more responses by providing their response codes as a comma-separated list without spaces, for example `expandResponses='200,201'`. Special value 'all' expands all responses by default. Be careful: this option can slow down documentation rendering time.
135+
136+
### expandSingleSchemaField
137+
138+
Automatically expands the single field in a schema.
139+
140+
### hideHostname
141+
142+
If set to `true`, the protocol and hostname are not shown in the operation definition.
143+
144+
### hideRequestPayloadSample
145+
146+
Hides request payload examples.
147+
148+
### hideOneOfDescription
149+
150+
If set to `true`, the description for `oneOf`/`anyOf` object is not shown in the schema.
151+
152+
### hideSchemaPattern
153+
154+
If set to `true`, the pattern is not shown in the schema.
155+
156+
### hideSecuritySection
157+
158+
Hides the Security panel section.
159+
160+
### hideSingleRequestSampleTab
161+
162+
Hides the request sample tab for requests with only one sample.
163+
164+
### menuToggle
165+
166+
If set to `true`, selecting an expanded item in the sidebar twice collapses it.
167+
168+
_Default: true_
169+
170+
### nativeScrollbars
171+
172+
If set to `true`, the sidebar uses the native scrollbar instead of perfect-scroll. This setting is a scrolling performance optimization for big API definitions.
173+
174+
### pathInMiddlePanel
175+
176+
Shows the path link and HTTP verb in the middle panel instead of the right panel.
177+
178+
### payloadSampleIdx
179+
180+
If set, the payload sample is inserted at the specified index. If there are `N` payload samples and the value configured here is bigger than `N`, the payload sample is inserted last. Indexes start from 0.
134181

135182
### showObjectSchemaExamples
136183

@@ -162,12 +209,12 @@ When set to true, sorts tags in the navigation sidebar and in the middle panel a
162209

163210
_Default: false_
164211

165-
### untrustedDefinition
212+
### untrustedSpec
166213

167214
If set to `true`, the API definition is considered untrusted and all HTML/Markdown is sanitized to prevent XSS.
168215

169216
## Theme settings
170-
217+
Change styles for the API documentation page. **Supported in Redoc CE 2.x**.
171218
* `spacing`
172219
* `unit`: 5 # main spacing unit used in autocomputed theme values later
173220
* `sectionHorizontal`: 40 # Horizontal section padding. COMPUTED: spacing.unit * 8
@@ -248,7 +295,7 @@ For more information, refer to [Security definitions injection](./security-defin
248295

249296
### OpenAPI specification extensions
250297

251-
Redoc uses the following [specification extensions](https://redocly.com/docs/api-reference-docs/spec-extensions/):
298+
Redoc uses the following [specification extensions](https://redocly.com/docs-legacy/api-reference-docs/spec-extensions/):
252299
* [`x-logo`](./redoc-vendor-extensions.md#x-logo) - is used to specify API logo
253300
* [`x-traitTag`](./redoc-vendor-extensions.md#x-traittag) - useful for handling out common things like Pagination, Rate-Limits, etc
254301
* [`x-codeSamples`](./redoc-vendor-extensions.md#x-codesamples) - specify operation code samples
@@ -257,10 +304,8 @@ Redoc uses the following [specification extensions](https://redocly.com/docs/api
257304
* [`x-displayName`](./redoc-vendor-extensions.md#x-displayname) - specify human-friendly names for the menu categories
258305
* [`x-tagGroups`](./redoc-vendor-extensions.md#x-taggroups) - group tags by categories in the side menu
259306
* [`x-servers`](./redoc-vendor-extensions.md#x-servers) - ability to specify different servers for API (backported from OpenAPI 3.0)
260-
* [`x-ignoredHeaderParameters`](./redoc-vendor-extensions.md#x-ignoredheaderparameters) - ability to specify header parameter names to ignore
261307
* [`x-additionalPropertiesName`](./redoc-vendor-extensions.md#x-additionalpropertiesname) - ability to supply a descriptive name for the additional property keys
262308
* [`x-summary`](./redoc-vendor-extensions.md#x-summary) - For Response object, use as the response button text, with description rendered under the button
263-
* [`x-extendedDiscriminator`](./redoc-vendor-extensions.md#x-extendeddiscriminator) - In Schemas, uses this to solve name-clash issues with the standard discriminator
264309
* [`x-explicitMappingOnly`](./redoc-vendor-extensions.md#x-explicitmappingonly) - In Schemas, display a more descriptive property name in objects with additionalProperties when viewing the property list with an object
265310

266311

docs/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ theme:
6767
openapi:
6868
disableSearch: true
6969
expandResponses: 200,202
70-
jsonSampleExpandLevel: 1
70+
jsonSamplesExpandLevel: 1
7171

7272
theme:
7373
sidebar:

0 commit comments

Comments
 (0)