mirror of
https://github.com/Redocly/redoc.git
synced 2024-11-10 19:06:34 +03:00
sync: Synced local 'docs/' with remote 'docs/redoc/'
This commit is contained in:
parent
ff492b5eb2
commit
75065a28fd
|
@ -1,7 +1,8 @@
|
|||
---
|
||||
title: Use the Redoc CLI
|
||||
redirectFrom:
|
||||
- /docs/redoc/quickstart/cli/
|
||||
redirects:
|
||||
'/docs/redoc/quickstart/cli/':
|
||||
to: '/docs/redoc/deployment/cli/'
|
||||
---
|
||||
|
||||
# How to use the Redocly CLI
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
---
|
||||
title: Use the Redoc Docker image
|
||||
redirectFrom:
|
||||
- /docs/redoc/quickstart/docker/
|
||||
redirects:
|
||||
'/docs/redoc/quickstart/docker/':
|
||||
to: '/docs/redoc/deployment/docker/'
|
||||
---
|
||||
|
||||
# How to use the Redoc Docker image
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
---
|
||||
title: Use Redoc in HTML
|
||||
redirectFrom:
|
||||
- /docs/redoc/quickstart/html/
|
||||
- /docs/redoc/quickstart/
|
||||
title: Use the Redoc HTML element
|
||||
redirects:
|
||||
'/docs/redoc/quickstart/html/':
|
||||
to: '/docs/redoc/deployment/html/'
|
||||
'/docs/redoc/quickstart/':
|
||||
to: '/docs/redoc/deployment/html/'
|
||||
---
|
||||
|
||||
# Use Redoc in HTML
|
||||
|
@ -38,11 +40,9 @@ description.
|
|||
</html>
|
||||
```
|
||||
|
||||
:::success URL or local file
|
||||
|
||||
{ % admonition type="success" name="URL or local file" % }
|
||||
Set `spec-url` to a relative path if the file is local, e.g. `spec-url=my-api.yaml`. Use a full URL like the example above if it's hosted elsewhere.
|
||||
|
||||
:::
|
||||
{ % /admonition % }
|
||||
|
||||
Open the HTML file in your browser to see the HTML documentation rendering. You may want to read the next section and add some configuration to make your documentation your own.
|
||||
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
---
|
||||
title: Redoc deployment guide
|
||||
redirectFrom:
|
||||
- /docs/redoc/quickstart/intro/
|
||||
redirects:
|
||||
'/docs/redoc/quickstart/intro/':
|
||||
to: '/docs/redoc/deployment/intro/'
|
||||
---
|
||||
|
||||
# Redoc deployment guide
|
||||
|
@ -37,10 +38,10 @@ You need an OpenAPI definition. For testing purposes, you can use one of the fol
|
|||
- [Thingful OpenAPI Definition](https://raw.githubusercontent.com/thingful/openapi-spec/master/spec/swagger.yaml)
|
||||
- [Fitbit Plus OpenAPI Definition](https://raw.githubusercontent.com/TwineHealth/TwineDeveloperDocs/master/spec/swagger.yaml)
|
||||
|
||||
:::info OpenAPI specification
|
||||
{% admonition type="info" name="OpenAPI specification" %}
|
||||
For more information on the OpenAPI specification, refer to the [Learning OpenAPI 3](https://redocly.com/docs/resources/learning-openapi/)
|
||||
section in the documentation.
|
||||
:::
|
||||
{% /admonition %}
|
||||
|
||||
### How to run Redoc locally
|
||||
|
||||
|
@ -105,7 +106,7 @@ npm install -g http-server
|
|||
Then, `cd` into your project directory and run the following command:
|
||||
|
||||
```node
|
||||
http-server
|
||||
http - server;
|
||||
```
|
||||
|
||||
The output after entering the command provides the local URL where the preview can be accessed.
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
---
|
||||
title: Use the Redoc React component
|
||||
redirectFrom:
|
||||
- /docs/redoc/quickstart/react/
|
||||
redirects:
|
||||
'/docs/redoc/quickstart/react/':
|
||||
to: '/docs/redoc/deployment/react/'
|
||||
---
|
||||
|
||||
# How to use the Redoc React component
|
||||
|
@ -71,7 +72,7 @@ is fully rendered or when an error occurs (with an error as the first argument).
|
|||
```js
|
||||
<RedocStandalone
|
||||
specUrl="http://petstore.swagger.io/v2/swagger.json"
|
||||
onLoaded={error => {
|
||||
onLoaded={(error) => {
|
||||
if (!error) {
|
||||
console.log('Yay!');
|
||||
}
|
||||
|
|
|
@ -56,7 +56,7 @@ Check out the [deployment documentation](./deployment/intro.md) for more options
|
|||
|
||||
Redoc is highly configurable. Each deployment option accepts configuration in a way that's appropriate to that platform, but the options are the same for each. For example:
|
||||
|
||||
* Using [Redocly CLI](../cli/index.mdx), configuration goes in the `redocly.yaml` file, or can be supplied as command line parameters, such as `--theme.openapi.disableSearch`.
|
||||
* Using [Redocly CLI](../cli/index.md), configuration goes in the `redocly.yaml` file, or can be supplied as command line parameters, such as `--theme.openapi.disableSearch`.
|
||||
* Using HTML or React, configure by setting `option` in the tag.
|
||||
|
||||
Here's a sample `redocly.yaml` configuration file, showing a few common settings and tweaking some of the visual theme settings:
|
||||
|
|
|
@ -43,12 +43,10 @@ replace the `spec-url` attribute with the URL or local file address to your defi
|
|||
</html>
|
||||
```
|
||||
|
||||
:::attention Redoc requires an HTTP server to run locally
|
||||
|
||||
{% admonition type="attention" name="Redoc requires an HTTP server to run locally" %}
|
||||
Loading local OpenAPI definitions is impossible without running a web server because of issues with
|
||||
[same-origin policy](https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy) and
|
||||
other security reasons. Refer to [Running Redoc locally](./deployment/intro.md#how-to-run-redoc-locally) for more information.
|
||||
|
||||
:::
|
||||
{% /admonition %}
|
||||
|
||||
For a more detailed explanation with step-by-step instructions and additional options for using Redoc, refer to the [Redoc deployment guide](./deployment/intro.md).
|
||||
|
|
Loading…
Reference in New Issue
Block a user