redoc 2.1.2 → 2.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +23 -0
- package/README.md +79 -258
- package/bundles/756674defce81e90acea.worker.js.LICENSE.txt +1 -1
- package/bundles/redoc.browser.lib.js +153 -147
- package/bundles/redoc.browser.lib.js.LICENSE.txt +1 -1
- package/bundles/redoc.browser.lib.js.map +1 -1
- package/bundles/redoc.lib.js +147 -141
- package/bundles/redoc.lib.js.LICENSE.txt +1 -1
- package/bundles/redoc.lib.js.map +1 -1
- package/bundles/redoc.standalone.js +262 -256
- package/bundles/redoc.standalone.js.LICENSE.txt +5 -5
- package/bundles/redoc.standalone.js.map +1 -1
- package/package.json +21 -21
- package/typings/common-elements/schema.d.ts +2 -2
- package/typings/services/OpenAPIParser.d.ts +4 -4
- package/typings/services/RedocNormalizedOptions.d.ts +2 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,26 @@
|
|
|
1
|
+
## [2.1.4](https://github.com/Redocly/redoc/compare/v2.1.3...v2.1.4) (2024-04-25)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* add deprecated css to clickable property name ([#2526](https://github.com/Redocly/redoc/issues/2526)) ([b0d03d0](https://github.com/Redocly/redoc/commit/b0d03d02069c1508447ddebc2f8a3fffa9b03ce5))
|
|
7
|
+
* use h2/h3 for headings instead of h1/h2 for better seo ([#2514](https://github.com/Redocly/redoc/issues/2514)) ([2b72dc0](https://github.com/Redocly/redoc/commit/2b72dc0e90f759a8ee2e47691c844e7f05928a24))
|
|
8
|
+
* security vulnerability ([#2445](https://github.com/Redocly/redoc/pull/2445)) ([1f11f5](https://github.com/Redocly/redoc/commit/1f11f597c4f10ddd601db247f5034052b6ca689f))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
## [2.1.3](https://github.com/Redocly/redoc/compare/v2.1.2...v2.1.3) (2023-10-24)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* default value as object in request body ([#2437](https://github.com/Redocly/redoc/issues/2437)) ([b36a6e2](https://github.com/Redocly/redoc/commit/b36a6e27bb3e03d39ee74c3e71f18a504539d91b))
|
|
18
|
+
* display string pattern in array items ([#2438](https://github.com/Redocly/redoc/issues/2438)) ([8ddeb6d](https://github.com/Redocly/redoc/commit/8ddeb6dfda686ec8a6948eb2d96efb99bf422429))
|
|
19
|
+
* hideRequestPayloadSample ([#2436](https://github.com/Redocly/redoc/issues/2436)) ([bf96061](https://github.com/Redocly/redoc/commit/bf960612a47bfe10ff205b9d78f3040515a5467d))
|
|
20
|
+
* more cases for react18 and cli integration ([#2416](https://github.com/Redocly/redoc/issues/2416)) ([26674e7](https://github.com/Redocly/redoc/commit/26674e70c66b686d0f0baa569b186292c41e5726))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
1
24
|
## [2.1.2](https://github.com/Redocly/redoc/compare/v2.1.1...v2.1.2) (2023-09-11)
|
|
2
25
|
|
|
3
26
|
|
package/README.md
CHANGED
|
@@ -1,19 +1,17 @@
|
|
|
1
1
|
<div align="center">
|
|
2
2
|
<img alt="Redoc logo" src="https://raw.githubusercontent.com/Redocly/redoc/main//docs/images/redoc.png" width="400px" />
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
# Generate beautiful API documentation from OpenAPI
|
|
5
5
|
|
|
6
|
-
[](https://www.npmjs.com/package/redoc) [](https://github.com/Redocly/redoc/blob/main/LICENSE)
|
|
7
7
|
|
|
8
|
-
[](https://cdn.redoc.ly/redoc/latest/bundles/redoc.standalone.js) [](https://www.npmjs.com/package/redoc) [](https://www.jsdelivr.com/package/npm/redoc)
|
|
8
|
+
[](https://cdn.redoc.ly/redoc/latest/bundles/redoc.standalone.js) [](https://www.npmjs.com/package/redoc) [](https://www.jsdelivr.com/package/npm/redoc)
|
|
9
9
|
</div>
|
|
10
10
|
|
|
11
|
-
**This is the README for the `2.x` version of Redoc (React-based).**
|
|
12
|
-
**The README for the `1.x` version is on the [v1.x](https://github.com/Redocly/redoc/tree/v1.x) branch.**
|
|
13
11
|
|
|
14
12
|
## About Redoc
|
|
15
13
|
|
|
16
|
-
Redoc is an open
|
|
14
|
+
Redoc is an open source tool for generating documentation from OpenAPI (formerly Swagger) definitions.
|
|
17
15
|
|
|
18
16
|
By default Redoc offers a three-panel, responsive layout:
|
|
19
17
|
|
|
@@ -32,161 +30,91 @@ A version of the Swagger Petstore API is displayed by default.
|
|
|
32
30
|
To test it with your own OpenAPI definition,
|
|
33
31
|
enter the URL for your definition and select **TRY IT**.
|
|
34
32
|
|
|
35
|
-
## Redoc
|
|
33
|
+
## Redoc features
|
|
36
34
|
|
|
37
|
-
Redoc is Redocly's community-edition product. Looking for something more?
|
|
38
|
-
Checkout the following feature comparison of Redocly's premium products versus Redoc:
|
|
39
|
-
|
|
40
|
-
| Features | Redoc | Reference | Portals |
|
|
41
|
-
|------------------------------|:---------:|:---------:|:-----------:|
|
|
42
|
-
| **Specs** | | | |
|
|
43
|
-
| Swagger 2.0 | √ | √ | √ |
|
|
44
|
-
| OpenAPI 3.0 | √ | √ | √ |
|
|
45
|
-
| OpenAPI 3.1 | √ (basic) | √ | √ |
|
|
46
|
-
| | | | |
|
|
47
|
-
| **Theming** | | | |
|
|
48
|
-
| Fonts/colors | √ | √ | √ |
|
|
49
|
-
| Extra theme options | | √ | √ |
|
|
50
|
-
| | | | |
|
|
51
|
-
| **Performance** | | | |
|
|
52
|
-
| Pagination | | √ | √ |
|
|
53
|
-
| Search (enhanced) | | √ | √ |
|
|
54
|
-
| Search (server-side) | | | √ |
|
|
55
|
-
| | | | |
|
|
56
|
-
| **Multiple APIs** | | | |
|
|
57
|
-
| Multiple versions | | √ | √ |
|
|
58
|
-
| Multiple APIs | | | √ |
|
|
59
|
-
| API catalog | | | √ |
|
|
60
|
-
| | | | |
|
|
61
|
-
| **Additional features** | | | |
|
|
62
|
-
| Try-it console | | √ | √ |
|
|
63
|
-
| Automated code samples | | √ | √ |
|
|
64
|
-
| Deep links | | √ | √ |
|
|
65
|
-
| More SEO control | | | √ |
|
|
66
|
-
| Contextual docs | | | √ |
|
|
67
|
-
| Landing pages | | | √ |
|
|
68
|
-
| React hooks for more control | | | √ |
|
|
69
|
-
| Personalization | | | √ |
|
|
70
|
-
| Analytics integrations | | | √ |
|
|
71
|
-
| Feedback | | | Coming Soon |
|
|
72
|
-
|
|
73
|
-
Refer to the Redocly's documentation for more information on these products:
|
|
74
|
-
|
|
75
|
-
- [Portals](https://redocly.com/docs/developer-portal/introduction/)
|
|
76
|
-
- [Reference](https://redocly.com/docs/api-reference-docs/getting-started/)
|
|
77
|
-
- [Redoc](https://redocly.com/docs/redoc/quickstart/intro/)
|
|
78
|
-
|
|
79
|
-
## Features
|
|
80
35
|
- Responsive three-panel design with menu/scrolling synchronization
|
|
81
|
-
-
|
|
82
|
-
- [Server-side rendering (SSR) ready](https://redocly.com/docs/redoc/quickstart/cli/#redoc-cli-commands)
|
|
36
|
+
- Support for OpenAPI 3.1, OpenAPI 3.0, and Swagger 2.0
|
|
83
37
|
- Ability to integrate your API introduction into the side menu
|
|
38
|
+
- High-level grouping in side menu with the [`x-tagGroups`](https://redocly.com/docs/api-reference-docs/specification-extensions/x-tag-groups/) specification extension
|
|
84
39
|
- [Simple integration with `create-react-app`](https://redocly.com/docs/redoc/quickstart/react/)
|
|
40
|
+
- Code samples support (with vendor extension) <br>
|
|
41
|
+

|
|
85
42
|
|
|
86
|
-
|
|
87
|
-
- [Command-line interface to bundle your docs into a **zero-dependency** HTML file](https://redocly.com/docs/cli/commands/build-docs/)
|
|
88
|
-
- Neat **interactive** documentation for nested objects <br>
|
|
89
|
-

|
|
43
|
+
## Usage
|
|
90
44
|
|
|
91
|
-
|
|
92
|
-
[<img alt="Customization services" src="http://i.imgur.com/c4sUF7M.png" height="60px">](https://redocly.com/#services)
|
|
93
|
-
- High-level grouping in side-menu with the [`x-tagGroups`](https://redocly.com/docs/api-reference-docs/specification-extensions/x-tag-groups/) specification extension
|
|
94
|
-
- Branding/customizations using the [`theme` option](https://redocly.com/docs/api-reference-docs/configuration/theming/)
|
|
45
|
+
Redoc is provided as a CLI tool (also distributed as a Docker image), HTML tag, and React component.
|
|
95
46
|
|
|
96
|
-
|
|
97
|
-
- OpenAPI v3.0 support
|
|
98
|
-
- Basic OpenAPI v3.1 support
|
|
99
|
-
- Broad OpenAPI v2.0 feature support (yes, it supports even `discriminator`) <br>
|
|
100
|
-

|
|
101
|
-
- Code samples support (via vendor extension) <br>
|
|
102
|
-

|
|
47
|
+
### Generate documentation from the CLI
|
|
103
48
|
|
|
104
|
-
|
|
105
|
-
**Important:** all the 2.x releases are deployed to npm and can be used with Redocly-cdn:
|
|
106
|
-
- particular release, for example, `v2.0.0`: https://cdn.redoc.ly/redoc/v2.0.0/bundles/redoc.standalone.js
|
|
107
|
-
- `latest` release: https://cdn.redoc.ly/redoc/latest/bundles/redoc.standalone.js
|
|
49
|
+
If you have Node installed, quickly generate documentation using `npx`:
|
|
108
50
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
- `latest` release: https://rebilly.github.io/ReDoc/releases/latest/redoc.min.js - points to latest 1.x.x release since 2.x releases are not hosted on this CDN but on unpkg.
|
|
51
|
+
```bash
|
|
52
|
+
npx @redocly/cli build-docs openapi.yaml
|
|
53
|
+
```
|
|
113
54
|
|
|
114
|
-
|
|
115
|
-
| Redoc Release | OpenAPI Specification |
|
|
116
|
-
|:--------------|:----------------------|
|
|
117
|
-
| 2.0.0-alpha.54| 3.1, 3.0.x, 2.0 |
|
|
118
|
-
| 2.0.0-alpha.x | 3.0, 2.0 |
|
|
119
|
-
| 1.19.x | 2.0 |
|
|
120
|
-
| 1.18.x | 2.0 |
|
|
121
|
-
| 1.17.x | 2.0 |
|
|
55
|
+
The tool outputs by default to a file named `redoc-static.html` that you can open in your browser.
|
|
122
56
|
|
|
123
|
-
|
|
124
|
-
- [Rebilly](https://api-reference.rebilly.com/)
|
|
125
|
-
- [Docker Engine](https://docs.docker.com/engine/api/v1.25/)
|
|
126
|
-
- [Zuora](https://www.zuora.com/developer/api-reference/)
|
|
127
|
-
- [Discourse](http://docs.discourse.org)
|
|
128
|
-
- [Commbox](https://www.commbox.io/api/)
|
|
129
|
-
- [APIs.guru](https://apis.guru/api-doc/)
|
|
130
|
-
- [BoxKnight](https://www.docs.boxknight.com/)
|
|
57
|
+
> [Redocly CLI](https://github.com/Redocly/redocly-cli/) does more than docs; check it out and add linting, bundling, and more to your API workflow.
|
|
131
58
|
|
|
132
|
-
|
|
59
|
+
### Add an HTML element to the page
|
|
133
60
|
|
|
134
|
-
|
|
135
|
-
your OpenAPI definition. Linting helps you to catch errors and inconsistencies in your
|
|
136
|
-
OpenAPI definition before publishing.
|
|
61
|
+
Create an HTML page, or edit an existing one, and add the following within the body tags:
|
|
137
62
|
|
|
138
|
-
|
|
63
|
+
```html
|
|
64
|
+
<redoc spec-url="http://petstore.swagger.io/v2/swagger.json"></redoc>
|
|
65
|
+
<script src="https://cdn.redoc.ly/redoc/latest/bundles/redoc.standalone.js"> </script>
|
|
66
|
+
```
|
|
139
67
|
|
|
140
|
-
|
|
68
|
+
Open the HTML file in your browser, and your API documentation is shown on the page.
|
|
141
69
|
|
|
142
|
-
|
|
70
|
+
Add your own `spec-url` to the `<redoc>` tag; this attribute can also be a local file. The JavaScript library can also be installed locally using `npm` and served from your own server, see the [HTML deployment documentation](https://redocly.com/docs/redoc/deployment/html/) for more details.
|
|
143
71
|
|
|
144
|
-
|
|
145
|
-
replace the `spec-url` attribute with the url or local file address to your definition.
|
|
72
|
+
### More usage options
|
|
146
73
|
|
|
147
|
-
|
|
148
|
-
<!DOCTYPE html>
|
|
149
|
-
<html>
|
|
150
|
-
<head>
|
|
151
|
-
<title>Redoc</title>
|
|
152
|
-
<!-- needed for adaptive design -->
|
|
153
|
-
<meta charset="utf-8"/>
|
|
154
|
-
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
155
|
-
<link href="https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Roboto:300,400,700" rel="stylesheet">
|
|
156
|
-
|
|
157
|
-
<!--
|
|
158
|
-
Redoc doesn't change outer page styles
|
|
159
|
-
-->
|
|
160
|
-
<style>
|
|
161
|
-
body {
|
|
162
|
-
margin: 0;
|
|
163
|
-
padding: 0;
|
|
164
|
-
}
|
|
165
|
-
</style>
|
|
166
|
-
</head>
|
|
167
|
-
<body>
|
|
168
|
-
<redoc spec-url='http://petstore.swagger.io/v2/swagger.json'></redoc>
|
|
169
|
-
<script src="https://cdn.redoc.ly/redoc/latest/bundles/redoc.standalone.js"> </script>
|
|
170
|
-
</body>
|
|
171
|
-
</html>
|
|
74
|
+
Check out the [deployment documentation](./docs/deployment/intro.md) for more options, and detailed documentation for each.
|
|
172
75
|
|
|
173
|
-
|
|
76
|
+
## Redoc vs. Redocly API Reference
|
|
77
|
+
|
|
78
|
+
Redoc is Redocly's community-edition product. Looking for something more?
|
|
79
|
+
We also offer [hosted API reference documentation](https://redocly.com/docs/api-registry/guides/api-registry-quickstart/)
|
|
80
|
+
with additional features including:
|
|
81
|
+
|
|
82
|
+
* Try-it console
|
|
83
|
+
* Automated code samples
|
|
84
|
+
* Pagination
|
|
85
|
+
* Extra theme options
|
|
174
86
|
|
|
175
|
-
|
|
176
|
-
to render your OpenAPI definition, refer to the
|
|
177
|
-
[**Redoc quickstart guide**](https://redocly.com/docs/redoc/quickstart/) and [**How to use the HTML element**](https://redocly.com/docs/redoc/deployment/html/).
|
|
87
|
+
### Documentation and resources
|
|
178
88
|
|
|
89
|
+
- [Reference docs](https://redocly.com/docs/api-reference-docs/getting-started/) - we take care of the hosting
|
|
90
|
+
- [Redoc](https://redocly.com/docs/redoc/) - detailed documentation for this open source project (also in the `docs/` folder)
|
|
91
|
+
- [Command-line interface to bundle your docs into a web-ready HTML file](https://redocly.com/docs/cli/commands/build-docs/)
|
|
92
|
+
- API linting, bundling, and much more with open source [Redocly CLI](https://redocly.com/docs/cli)
|
|
93
|
+
|
|
94
|
+
## Showcase
|
|
95
|
+
|
|
96
|
+
A sample of the organizations using Redocly tools in the wild:
|
|
97
|
+
|
|
98
|
+
- [Rebilly](https://api-reference.rebilly.com/)
|
|
99
|
+
- [Docker Engine](https://docs.docker.com/engine/api/v1.25/)
|
|
100
|
+
- [Zuora](https://www.zuora.com/developer/api-reference/)
|
|
101
|
+
- [Discourse](http://docs.discourse.org)
|
|
102
|
+
- [Commbox](https://www.commbox.io/api/)
|
|
103
|
+
- [APIs.guru](https://apis.guru/api-doc/)
|
|
104
|
+
- [BoxKnight](https://www.docs.boxknight.com/)
|
|
105
|
+
- [Quaderno API](https://developers.quaderno.io/api)
|
|
106
|
+
|
|
107
|
+
_Pull requests to add your own API page to the list are welcome_
|
|
179
108
|
|
|
180
109
|
## Configuration
|
|
181
110
|
|
|
182
|
-
|
|
183
|
-
You can inject the Security Definitions widget into any place in your definition `description`.
|
|
184
|
-
For more information, refer to [Security definitions injection](docs/security-definitions-injection.md).
|
|
111
|
+
Redoc is highly configurable, see the [configuration documentation](docs/config.md) for details.
|
|
185
112
|
|
|
186
113
|
### OpenAPI specification extensions
|
|
187
114
|
Redoc uses the following [specification extensions](https://redocly.com/docs/api-reference-docs/spec-extensions/):
|
|
115
|
+
|
|
188
116
|
* [`x-logo`](docs/redoc-vendor-extensions.md#x-logo) - is used to specify API logo
|
|
189
|
-
* [`x-traitTag`](docs/redoc-vendor-extensions.md#x-traitTag) - useful for
|
|
117
|
+
* [`x-traitTag`](docs/redoc-vendor-extensions.md#x-traitTag) - useful for tags that refer to non-navigation properties like Pagination, Rate-Limits, etc
|
|
190
118
|
* [`x-codeSamples`](docs/redoc-vendor-extensions.md#x-codeSamples) - specify operation code samples
|
|
191
119
|
* [`x-examples`](docs/redoc-vendor-extensions.md#x-examples) - specify JSON example for requests
|
|
192
120
|
* [`x-nullable`](docs/redoc-vendor-extensions.md#x-nullable) - mark schema param as a nullable
|
|
@@ -195,130 +123,23 @@ Redoc uses the following [specification extensions](https://redocly.com/docs/api
|
|
|
195
123
|
* [`x-servers`](docs/redoc-vendor-extensions.md#x-servers) - ability to specify different servers for API (backported from OpenAPI 3.0)
|
|
196
124
|
* [`x-ignoredHeaderParameters`](docs/redoc-vendor-extensions.md#x-ignoredHeaderParameters) - ability to specify header parameter names to ignore
|
|
197
125
|
* [`x-additionalPropertiesName`](docs/redoc-vendor-extensions.md#x-additionalPropertiesName) - ability to supply a descriptive name for the additional property keys
|
|
198
|
-
* [`x-summary`](docs/redoc-vendor-extensions.md#x-summary) -
|
|
199
|
-
* [`x-extendedDiscriminator`](docs/redoc-vendor-extensions.md#x-extendedDiscriminator) -
|
|
200
|
-
* [`x-explicitMappingOnly`](docs/redoc-vendor-extensions.md#x-explicitMappingOnly) -
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
* `hideFab` - do not show FAB in mobile view. Useful for implementing a custom floating action button.
|
|
217
|
-
* `hideSchemaPattern` - if set, the pattern is not shown in the schema.
|
|
218
|
-
* `hideSingleRequestSampleTab` - do not show the request sample tab for requests with only one sample.
|
|
219
|
-
* `showObjectSchemaExamples` - show object schema example in the properties, default `false`.
|
|
220
|
-
* `expandSingleSchemaField` - automatically expand single field in a schema
|
|
221
|
-
* `schemaExpansionLevel` - specifies whether to automatically expand schemas. Special value `"all"` expands all levels. The default value is `0`.
|
|
222
|
-
* `jsonSampleExpandLevel` - set the default expand level for JSON payload samples (responses and request body). Special value `"all"` expands all levels. The default value is `2`.
|
|
223
|
-
* `hideSchemaTitles` - do not display schema `title` next to to the type
|
|
224
|
-
* `simpleOneOfTypeLabel` - show only unique oneOf types in the label without titles
|
|
225
|
-
* `sortEnumValuesAlphabetically` - set to true, sorts all enum values in all schemas alphabetically
|
|
226
|
-
* `sortOperationsAlphabetically` - set to true, sorts operations in the navigation sidebar and in the middle panel alphabetically
|
|
227
|
-
* `sortTagsAlphabetically` - set to true, sorts tags in the navigation sidebar and in the middle panel alphabetically
|
|
228
|
-
* `menuToggle` - if true, clicking second time on expanded menu item collapses it, default `true`.
|
|
229
|
-
* `nativeScrollbars` - use native scrollbar for sidemenu instead of perfect-scroll (scrolling performance optimization for big specs).
|
|
230
|
-
* `onlyRequiredInSamples` - shows only required fields in request samples.
|
|
231
|
-
* `pathInMiddlePanel` - show path link and HTTP verb in the middle panel instead of the right one.
|
|
232
|
-
* `requiredPropsFirst` - show required properties first ordered in the same order as in `required` array.
|
|
233
|
-
* `scrollYOffset` - If set, specifies a vertical scroll-offset. This is often useful when there are fixed positioned elements at the top of the page, such as navbars, headers etc;
|
|
234
|
-
`scrollYOffset` can be specified in various ways:
|
|
235
|
-
* **number**: A fixed number of pixels to be used as offset.
|
|
236
|
-
* **selector**: 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 offset.
|
|
237
|
-
* **function**: A getter function. Must return a number representing the offset (in pixels).
|
|
238
|
-
* `showExtensions` - show vendor extensions ("x-" fields). Extensions used by Redoc are ignored. Can be boolean or an array of `string` with names of extensions to display.
|
|
239
|
-
* `sortPropsAlphabetically` - sort properties alphabetically.
|
|
240
|
-
* `payloadSampleIdx` - if set, payload sample is inserted at this index or last. Indexes start from 0.
|
|
241
|
-
* `theme` - Redoc theme. For details check [theme docs](#redoc-theme-object).
|
|
242
|
-
* `untrustedSpec` - if set, the spec is considered untrusted and all HTML/markdown is sanitized to prevent XSS. **Disabled by default** for performance reasons. **Enable this option if you work with untrusted user data!**
|
|
243
|
-
* `nonce` - if set, the provided value is injected in every injected HTML element in the `nonce` attribute. Useful when using CSP, see https://webpack.js.org/guides/csp/.
|
|
244
|
-
* `sideNavStyle` - can be specified in various ways:
|
|
245
|
-
* **summary-only**: displays a summary in the sidebar navigation item. (**default**)
|
|
246
|
-
* **path-only**: displays a path in the sidebar navigation item.
|
|
247
|
-
* **id-only**: displays the operation id with a fallback to the path in the sidebar navigation item.
|
|
248
|
-
* `showWebhookVerb` - when set to `true`, shows the HTTP request method for webhooks in operations and in the sidebar.
|
|
249
|
-
|
|
250
|
-
### `<redoc>` theme object
|
|
251
|
-
* `spacing`
|
|
252
|
-
* `unit`: 5 # main spacing unit used in autocomputed theme values later
|
|
253
|
-
* `sectionHorizontal`: 40 # Horizontal section padding. COMPUTED: spacing.unit * 8
|
|
254
|
-
* `sectionVertical`: 40 # Horizontal section padding. COMPUTED: spacing.unit * 8
|
|
255
|
-
* `breakpoints` # breakpoints for switching three/two and mobile view layouts
|
|
256
|
-
* `small`: '50rem'
|
|
257
|
-
* `medium`: '85rem'
|
|
258
|
-
* `large`: '105rem'
|
|
259
|
-
* `colors`
|
|
260
|
-
* `tonalOffset`: 0.3 # default tonal offset used in computations
|
|
261
|
-
* `typography`
|
|
262
|
-
* `fontSize`: '14px'
|
|
263
|
-
* `lineHeight`: '1.5em'
|
|
264
|
-
* `fontWeightRegular`: '400'
|
|
265
|
-
* `fontWeightBold`: '600'
|
|
266
|
-
* `fontWeightLight`: '300'
|
|
267
|
-
* `fontFamily`: 'Roboto, sans-serif'
|
|
268
|
-
* `smoothing`: 'antialiased'
|
|
269
|
-
* `optimizeSpeed`: true
|
|
270
|
-
* `headings`
|
|
271
|
-
* `fontFamily`: 'Montserrat, sans-serif'
|
|
272
|
-
* `fontWeight`: '400'
|
|
273
|
-
* `lineHeight`: '1.6em'
|
|
274
|
-
* `code` # inline code styling
|
|
275
|
-
* `fontSize`: '13px'
|
|
276
|
-
* `fontFamily`: 'Courier, monospace'
|
|
277
|
-
* `lineHeight`: # COMPUTED: typography.lineHeight
|
|
278
|
-
* `fontWeight`: # COMPUTED: typography.fontWeightRegular
|
|
279
|
-
* `color`: '#e53935'
|
|
280
|
-
* `backgroundColor`: 'rgba(38, 50, 56, 0.05)'
|
|
281
|
-
* `wrap`: false # whether to break word for inline blocks (otherwise they can overflow)
|
|
282
|
-
* `links`
|
|
283
|
-
* `color`: # COMPUTED: colors.primary.main
|
|
284
|
-
* `visited`: # COMPUTED: typography.links.color
|
|
285
|
-
* `hover`: # COMPUTED: lighten(0.2 typography.links.color)
|
|
286
|
-
* `textDecoration`: 'auto'
|
|
287
|
-
* `hoverTextDecoration`: 'auto'
|
|
288
|
-
* `sidebar`
|
|
289
|
-
* `width`: '260px'
|
|
290
|
-
* `backgroundColor`: '#fafafa'
|
|
291
|
-
* `textColor`: '#333333'
|
|
292
|
-
* `activeTextColor`: # COMPUTED: theme.sidebar.textColor (if set by user) or theme.colors.primary.main
|
|
293
|
-
* `groupItems` # Group headings
|
|
294
|
-
* `activeBackgroundColor`: # COMPUTED: theme.sidebar.backgroundColor
|
|
295
|
-
* `activeTextColor`: # COMPUTED: theme.sidebar.activeTextColor
|
|
296
|
-
* `textTransform`: 'uppercase'
|
|
297
|
-
* `level1Items` # Level 1 items like tags or section 1st level items
|
|
298
|
-
* `activeBackgroundColor`: # COMPUTED: theme.sidebar.backgroundColor
|
|
299
|
-
* `activeTextColor`: # COMPUTED: theme.sidebar.activeTextColor
|
|
300
|
-
* `textTransform`: 'none'
|
|
301
|
-
* `arrow` # sidebar arrow
|
|
302
|
-
* `size`: '1.5em'
|
|
303
|
-
* `color`: # COMPUTED: theme.sidebar.textColor
|
|
304
|
-
* `logo`
|
|
305
|
-
* `maxHeight`: # COMPUTED: sidebar.width
|
|
306
|
-
* `maxWidth`: # COMPUTED: sidebar.width
|
|
307
|
-
* `gutter`: '2px' # logo image padding
|
|
308
|
-
* `rightPanel`
|
|
309
|
-
* `backgroundColor`: '#263238'
|
|
310
|
-
* `width`: '40%'
|
|
311
|
-
* `textColor`: '#ffffff'
|
|
312
|
-
* `servers`
|
|
313
|
-
* `overlay`
|
|
314
|
-
* `backgroundColor`: '#fafafa'
|
|
315
|
-
* `textColor`: '#263238'
|
|
316
|
-
* `url`
|
|
317
|
-
* `backgroundColor`: '#fff'
|
|
318
|
-
* `fab`
|
|
319
|
-
* `backgroundColor`: '#263238'
|
|
320
|
-
* `color`: '#ffffff'
|
|
321
|
-
|
|
322
|
-
-----------
|
|
126
|
+
* [`x-summary`](docs/redoc-vendor-extensions.md#x-summary) - for Response object, use as the response button text, with description rendered under the button
|
|
127
|
+
* [`x-extendedDiscriminator`](docs/redoc-vendor-extensions.md#x-extendedDiscriminator) - in Schemas, uses this to solve name-clash issues with the standard discriminator
|
|
128
|
+
* [`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
|
|
129
|
+
|
|
130
|
+
## Releases
|
|
131
|
+
|
|
132
|
+
**The README for the `1.x` version is on the [v1.x](https://github.com/Redocly/redoc/tree/v1.x) branch.**
|
|
133
|
+
|
|
134
|
+
All the 2.x releases are deployed to npm and can be used with Redocly-cdn:
|
|
135
|
+
- particular release, for example, `v2.0.0`: https://cdn.redoc.ly/redoc/v2.0.0/bundles/redoc.standalone.js
|
|
136
|
+
- `latest` release: https://cdn.redoc.ly/redoc/latest/bundles/redoc.standalone.js
|
|
137
|
+
|
|
138
|
+
Additionally, all the 1.x releases are hosted on our GitHub Pages-based CDN **(deprecated)**:
|
|
139
|
+
- particular release, for example `v1.2.0`: https://rebilly.github.io/ReDoc/releases/v1.2.0/redoc.min.js
|
|
140
|
+
- `v1.x.x` release: https://rebilly.github.io/ReDoc/releases/v1.x.x/redoc.min.js
|
|
141
|
+
- `latest` release: https://rebilly.github.io/ReDoc/releases/latest/redoc.min.js - points to latest 1.x.x release since 2.x releases are not hosted on this CDN but on unpkg.
|
|
142
|
+
|
|
143
|
+
|
|
323
144
|
## Development
|
|
324
145
|
see [CONTRIBUTING.md](.github/CONTRIBUTING.md)
|