sync: Synced local 'docs/' with remote 'docs/redoc/'

This commit is contained in:
redocly-bot 2023-10-09 16:35:52 +00:00
parent ff492b5eb2
commit 75065a28fd
7 changed files with 28 additions and 26 deletions

View File

@ -1,7 +1,8 @@
--- ---
title: Use the Redoc CLI title: Use the Redoc CLI
redirectFrom: redirects:
- /docs/redoc/quickstart/cli/ '/docs/redoc/quickstart/cli/':
to: '/docs/redoc/deployment/cli/'
--- ---
# How to use the Redocly CLI # How to use the Redocly CLI

View File

@ -1,7 +1,8 @@
--- ---
title: Use the Redoc Docker image title: Use the Redoc Docker image
redirectFrom: redirects:
- /docs/redoc/quickstart/docker/ '/docs/redoc/quickstart/docker/':
to: '/docs/redoc/deployment/docker/'
--- ---
# How to use the Redoc Docker image # How to use the Redoc Docker image

View File

@ -1,8 +1,10 @@
--- ---
title: Use Redoc in HTML title: Use the Redoc HTML element
redirectFrom: redirects:
- /docs/redoc/quickstart/html/ '/docs/redoc/quickstart/html/':
- /docs/redoc/quickstart/ to: '/docs/redoc/deployment/html/'
'/docs/redoc/quickstart/':
to: '/docs/redoc/deployment/html/'
--- ---
# Use Redoc in HTML # Use Redoc in HTML
@ -38,11 +40,9 @@ description.
</html> </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. 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. 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.

View File

@ -1,7 +1,8 @@
--- ---
title: Redoc deployment guide title: Redoc deployment guide
redirectFrom: redirects:
- /docs/redoc/quickstart/intro/ '/docs/redoc/quickstart/intro/':
to: '/docs/redoc/deployment/intro/'
--- ---
# Redoc deployment guide # 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) - [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) - [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/) For more information on the OpenAPI specification, refer to the [Learning OpenAPI 3](https://redocly.com/docs/resources/learning-openapi/)
section in the documentation. section in the documentation.
::: {% /admonition %}
### How to run Redoc locally ### 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: Then, `cd` into your project directory and run the following command:
```node ```node
http-server http - server;
``` ```
The output after entering the command provides the local URL where the preview can be accessed. The output after entering the command provides the local URL where the preview can be accessed.

View File

@ -1,7 +1,8 @@
--- ---
title: Use the Redoc React component title: Use the Redoc React component
redirectFrom: redirects:
- /docs/redoc/quickstart/react/ '/docs/redoc/quickstart/react/':
to: '/docs/redoc/deployment/react/'
--- ---
# How to use the Redoc React component # 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 ```js
<RedocStandalone <RedocStandalone
specUrl="http://petstore.swagger.io/v2/swagger.json" specUrl="http://petstore.swagger.io/v2/swagger.json"
onLoaded={error => { onLoaded={(error) => {
if (!error) { if (!error) {
console.log('Yay!'); console.log('Yay!');
} }

View File

@ -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: 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. * 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: Here's a sample `redocly.yaml` configuration file, showing a few common settings and tweaking some of the visual theme settings:

View File

@ -43,12 +43,10 @@ replace the `spec-url` attribute with the URL or local file address to your defi
</html> </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 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 [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. 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). 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).