mirror of
https://github.com/Redocly/redoc.git
synced 2025-01-31 10:04:08 +03:00
parent
209c6caca0
commit
9a34f22aff
|
@ -212,12 +212,13 @@ You can use all of the following options with standalone version on <redoc> tag
|
||||||
## Advanced usage of standalone version
|
## Advanced usage of standalone version
|
||||||
Instead of adding `spec-url` attribute to the `<redoc>` element you can initialize ReDoc via globally exposed `Redoc` object:
|
Instead of adding `spec-url` attribute to the `<redoc>` element you can initialize ReDoc via globally exposed `Redoc` object:
|
||||||
```js
|
```js
|
||||||
Redoc.init(specOrSpecUrl, options, element)
|
Redoc.init(specOrSpecUrl, options, element, callback?)
|
||||||
```
|
```
|
||||||
|
|
||||||
- `specOrSpecUrl` is either JSON object with specification or an URL to the spec in `JSON` or `YAML` format
|
- `specOrSpecUrl` is either JSON object with specification or an URL to the spec in `JSON` or `YAML` format
|
||||||
- `options` [options object](#redoc-options-object)
|
- `options` [options object](#redoc-options-object)
|
||||||
- `element` DOM element to put ReDoc into
|
- `element` DOM element to put ReDoc into
|
||||||
|
- `callback` (optional) - callback to be called after Redoc has been fully rendered
|
||||||
|
|
||||||
```js
|
```js
|
||||||
Redoc.init('http://petstore.swagger.io/v2/swagger.json', {
|
Redoc.init('http://petstore.swagger.io/v2/swagger.json', {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user