docs: remove deprecated CLI commands from docs (#2691)

This commit is contained in:
Andrew Tatomyr 2025-05-20 20:47:37 +03:00 committed by GitHub
parent 00bc6edfc4
commit 3ae251b7e4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 7 additions and 35 deletions

View File

@ -12,9 +12,9 @@ With Redocly CLI, you can bundle your OpenAPI definition and API documentation
First, you need to install the `@redocly/cli` package. First, you need to install the `@redocly/cli` package.
You can install it [globally](../../cli/installation.md#install-globally) using npm or Yarn. You can install it [globally](../../cli/installation#install-globally) using npm.
Or you can install it during [runtime](../../cli/installation.md#use-npx-at-runtime) using npx or Docker. Or you can install it during [runtime](../../cli/installation#use-npx-at-runtime) using npx or Docker.
## Step 2 - Build the HTML file ## Step 2 - Build the HTML file
@ -27,9 +27,9 @@ replacing `apis/openapi.yaml` with your API definition file's name and path:
redocly build-docs apis/openapi.yaml redocly build-docs apis/openapi.yaml
``` ```
See the [build-docs](../../cli/commands/build-docs.md) documentation for more information See the [build-docs](../../cli/commands/build-docs) documentation for more information
on the different options and ways you can use the command. on the different options and ways you can use the command.
Also, check out [Redocly CLI commands](../../cli/commands/index.md), for more Also, check out [Redocly CLI commands](../../cli/commands), for more
information on the different things you can do with Redocly CLI including information on the different things you can do with Redocly CLI including
linting, splitting, and bundling your API definition file. linting, splitting, and bundling your API definition file.

View File

@ -45,34 +45,6 @@ section in the documentation.
If you want to view your Redoc output locally, you can simulate an HTTP server. If you want to view your Redoc output locally, you can simulate an HTTP server.
#### Redocly CLI
Redocly CLI is an open source command-line tool that includes a command
for simulating an HTTP server to provide a preview of your OpenAPI definition locally.
If you have [Redocly CLI](https://redocly.com/docs/cli/#installation-and-usage) installed, `cd` into your
project directory and run the following command:
```bash
redocly preview-docs openapi.yaml
```
Replace `openapi.yaml` in the example command with the file path to your OpenAPI definition.
By default, without providing a port, the preview starts on port 8080, and can be accessed at `http://localhost:8080`.
To exit the preview, use `control+C`.
You can alter the port if you are using 8080 already, for example:
```bash
redocly preview-docs -p 8888 openapi.yaml
```
Replace `openapi.yaml` in the example command with the file path to your OpenAPI definition.
For more information about the `preview-docs` command, refer to
[Redocly CLI commands](https://redocly.com/docs/cli/commands/preview-docs/#preview-docs) in the Redocly CLI documentation.
#### Python #### Python
If you have [Python 3](https://www.python.org/downloads/) installed, `cd` into your If you have [Python 3](https://www.python.org/downloads/) installed, `cd` into your

View File

@ -57,7 +57,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.md), configuration goes in the `redocly.yaml` file, or can be supplied as command line parameters, such as `--theme.openapi.disableSearch`. * Using [Redocly CLI](../cli), 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:
@ -85,13 +85,13 @@ theme:
Redocly CLI detects a file named `redocly.yaml` in the same directory as you run the command and uses it. See the documentation with a command like this: Redocly CLI detects a file named `redocly.yaml` in the same directory as you run the command and uses it. See the documentation with a command like this:
```sh ```sh
redocly preview-docs openapi.yaml redocly build-docs openapi.yaml
``` ```
There are many, many more options available. Visit the [configuration reference](./config.md) for a complete list. There are many, many more options available. Visit the [configuration reference](./config.md) for a complete list.
## Next steps ## Next steps
* If you are new to OpenAPI, try the [OpenAPI starter project](../cli/openapi-starter.md) for a great introduction. * If you are new to OpenAPI, try the [OpenAPI starter project](../cli/openapi-starter) for a great introduction.
* Ready to build documentation from an existing OpenAPI file? Go to the [Redoc quickstart](./quickstart.md) and get started. * Ready to build documentation from an existing OpenAPI file? Go to the [Redoc quickstart](./quickstart.md) and get started.
* Learn more about the project by visiting [Redoc on GitHub](https://github.com/Redocly/redoc). * Learn more about the project by visiting [Redoc on GitHub](https://github.com/Redocly/redoc).