Skip to content

Commit 4014423

Browse files
committed
docs: add latest to all npx redocly cli commands
1 parent 0743fba commit 4014423

File tree

8 files changed

+24
-24
lines changed

8 files changed

+24
-24
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Supports OpenAPI 3.1, 3.0 and OpenAPI 2.0 (legacy Swagger), AsyncAPI 3.0 and 2.6
1616
### Node
1717

1818
```sh
19-
npx @redocly/cli lint path-to-root-file.yaml
19+
npx @redocly/cli@latest lint path-to-root-file.yaml
2020
```
2121

2222
Alternatively, install it globally with `npm`:

docs/commands/generate-arazzo.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ The first HTTP response is used as the success criteria for each step.
2020
## Usage
2121

2222
```sh
23-
npx @redocly/cli generate-arazzo <your-OAS-description-file> [-o | --output-file]
23+
npx @redocly/cli@latest generate-arazzo <your-OAS-description-file> [-o | --output-file]
2424
```
2525

2626
## Options
@@ -41,7 +41,7 @@ npx @redocly/cli generate-arazzo <your-OAS-description-file> [-o | --output-file
4141

4242
## Examples
4343

44-
Run the command: `npx @redocly/cli generate-arazzo 'https://warp-single-sidebar.redocly.app/_spec/apis/index.yaml'`
44+
Run the command: `npx @redocly/cli@latest generate-arazzo 'https://warp-single-sidebar.redocly.app/_spec/apis/index.yaml'`
4545

4646
The command generates an `auto-generated.arazzo.yaml` file in the current directory.
4747

docs/commands/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ There are some parameters supported by all commands:
5353
`--help` display the command help, or the help for the subcommand if you used one. For example:
5454

5555
```bash
56-
npx @redocly/cli lint --help
56+
npx @redocly/cli@latest lint --help
5757
```
5858

5959
Try these with any of the other commands.
@@ -69,7 +69,7 @@ If Redocly CLI finds `redocly.yaml` in the root directory, it uses the options s
6969
You can also specify a config file to most commands using `--config myconfig.yaml` as part of the command. For example:
7070

7171
```bash
72-
npx @redocly/cli lint --config redocly-official.yaml openapi.yaml
72+
npx @redocly/cli@latest lint --config redocly-official.yaml openapi.yaml
7373
```
7474

7575
For more information, refer to the [Redocly configuration file](../configuration/index.md) docs.

docs/commands/push.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ The following command pushes the `docs/museum.yaml` file to the project `push-do
104104
It uses the variables available in the GitHub actions context to supply information to the destination.
105105

106106
```bash
107-
npx @redocly/cli push docs/museum.yaml \
107+
npx @redocly/cli@latest push docs/museum.yaml \
108108
--organization "Docs" \
109109
--project "push-docs" \
110110
--mount-path "/docs/remotes/cicd" \

docs/commands/respect.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Use this command to execute API tests described in an Arazzo description.
1111
## Usage
1212

1313
```sh
14-
npx @redocly/cli respect <your-test-file | multiple files | files bash query> [-w | --workflow] [-s | --skip] [-v | --verbose] [-i | --input] [-S | --server] [-H | --har-output] [-J | --json-output]
14+
npx @redocly/cli@latest respect <your-test-file | multiple files | files bash query> [-w | --workflow] [-s | --skip] [-v | --verbose] [-i | --input] [-S | --server] [-H | --har-output] [-J | --json-output]
1515
```
1616

1717
## Options
@@ -27,7 +27,7 @@ npx @redocly/cli respect <your-test-file | multiple files | files bash query> [-
2727
- -w, --workflow
2828
- [string]
2929
- Workflow names from the test file to run.
30-
For example, the following command runs "first-flow" and "second-flow" workflows from the `test-file.yaml` Arazzo description: `npx @redocly/cli respect test-file.yaml --workflow first-flow second-flow`.
30+
For example, the following command runs "first-flow" and "second-flow" workflows from the `test-file.yaml` Arazzo description: `npx @redocly/cli@latest respect test-file.yaml --workflow first-flow second-flow`.
3131
{% admonition type="warning" %}
3232
The `--workflow` option can't be used with `--skip`.
3333
{% /admonition %}
@@ -37,7 +37,7 @@ npx @redocly/cli respect <your-test-file | multiple files | files bash query> [-
3737
- -s, --skip
3838
- [string]
3939
- Workflow names from the test file to skip.
40-
For example, the following command skips the "first-flow" workflow from the `test-file.yaml` Arazzo description: `npx @redocly/cli respect test-file.yaml --skip first-flow`.
40+
For example, the following command skips the "first-flow" workflow from the `test-file.yaml` Arazzo description: `npx @redocly/cli@latest respect test-file.yaml --skip first-flow`.
4141
{% admonition type="warning" name="Warning" %}
4242
The `--skip` option can't be used with `--workflow`.
4343
{% /admonition %}
@@ -47,38 +47,38 @@ npx @redocly/cli respect <your-test-file | multiple files | files bash query> [-
4747
- -v, --verbose
4848
- boolean
4949
- Runs the command in verbose mode to help with troubleshooting issues.
50-
For example, the following command runs all workflows from the `test-file.yaml` Arazzo description in verbose mode: `npx @redocly/cli respect test-file.yaml --verbose`.
50+
For example, the following command runs all workflows from the `test-file.yaml` Arazzo description in verbose mode: `npx @redocly/cli@latest respect test-file.yaml --verbose`.
5151

5252
---
5353

5454
- --har-output
5555
- string
5656
- Path for the `har` file for saving logs.
57-
For example, the following command runs all workflows from the `test-file.yaml` Arazzo description and saves the logs to the `logs.har` file: `npx @redocly/cli respect test-file.yaml --har-output='logs.har'`.
57+
For example, the following command runs all workflows from the `test-file.yaml` Arazzo description and saves the logs to the `logs.har` file: `npx @redocly/cli@latest respect test-file.yaml --har-output='logs.har'`.
5858

5959
---
6060

6161
- --json-output
6262
- string
63-
- Path for the JSON file for saving logs. For example, the following command runs all workflows from the `test-file.yaml` Arazzo description and saves the logs to the `logs.json` file:`npx @redocly/cli respect test-file.yaml --json-output='logs.json'`.
63+
- Path for the JSON file for saving logs. For example, the following command runs all workflows from the `test-file.yaml` Arazzo description and saves the logs to the `logs.json` file:`npx @redocly/cli@latest respect test-file.yaml --json-output='logs.json'`.
6464

6565
---
6666

6767
- --input
6868
- string
6969
- Input parameters with values that are mapped to the workflow inputs description.
70-
For example, the following command maps the "userEmail" and "userPassword" inputs and values to all workflows in the `test.yaml` Arazzo description: `npx @redocly/cli respect test.yaml --input userEmail=name@redocly.com --input userPassword=12345`.
70+
For example, the following command maps the "userEmail" and "userPassword" inputs and values to all workflows in the `test.yaml` Arazzo description: `npx @redocly/cli@latest respect test.yaml --input userEmail=name@redocly.com --input userPassword=12345`.
7171
You can also use an environment variable to set the input, as in the following example: `REDOCLY_CLI_RESPECT_INPUT='userEmail=name@redocly.com,userPassword=12345' npm run cli respect test.yaml`
7272

73-
You can even include nested values, as in the following example command that maps the `nestedKey` input and value to all workflows in the `test-file.yaml` Arazzo description: `npx @redocly/cli respect test-file.yaml --input '{"key": "value", "nested": {"nestedKey": "nestedValue"}}'`.
74-
You can also use an environment variable to set the input, as in the following example: `REDOCLY_CLI_RESPECT_INPUT='{"key":"value","nested":{"nestedKey":"nestedValue"}}' npx @redocly/cli respect test-file.yaml`
73+
You can even include nested values, as in the following example command that maps the `nestedKey` input and value to all workflows in the `test-file.yaml` Arazzo description: `npx @redocly/cli@latest respect test-file.yaml --input '{"key": "value", "nested": {"nestedKey": "nestedValue"}}'`.
74+
You can also use an environment variable to set the input, as in the following example: `REDOCLY_CLI_RESPECT_INPUT='{"key":"value","nested":{"nestedKey":"nestedValue"}}' npx @redocly/cli@latest respect test-file.yaml`
7575

7676
---
7777

7878
- --server
7979
- string
8080
- Server overrides for the `sourceDescriptions` object.
81-
For example, the following command runs all workflows from the `test-file.yaml` Arazzo description and instead of using the server listed in the API description, uses the server at `https://test.com`: `npx @redocly/cli respect test-file.yaml --server test=https://test.com`.
81+
For example, the following command runs all workflows from the `test-file.yaml` Arazzo description and instead of using the server listed in the API description, uses the server at `https://test.com`: `npx @redocly/cli@latest respect test-file.yaml --server test=https://test.com`.
8282

8383
You can also pass the server overrides as an environment variable, as in the following example:
8484
`REDOCLY_CLI_RESPECT_SERVER="test=https://test.com"`.
@@ -87,9 +87,9 @@ npx @redocly/cli respect <your-test-file | multiple files | files bash query> [-
8787

8888
## Examples
8989

90-
- Run the tests by running the following command: `npx @redocly/cli respect <your-test-file>`.
91-
- Run multiple tests by running the following command: `npx @redocly/cli respect <your-test-file-one> <your-test-file-two>`.
92-
- Run multiple tests by running the following command with bash selector : `npx @redocly/cli respect $(find ./path-to-tests-folder -type f -name '*.arazzo.yaml')`.
90+
- Run the tests by running the following command: `npx @redocly/cli@latest respect <your-test-file>`.
91+
- Run multiple tests by running the following command: `npx @redocly/cli@latest respect <your-test-file-one> <your-test-file-two>`.
92+
- Run multiple tests by running the following command with bash selector : `npx @redocly/cli@latest respect $(find ./path-to-tests-folder -type f -name '*.arazzo.yaml')`.
9393

9494
**Example output**
9595

docs/guides/hide-specification-extensions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ In this step, two API snapshots are produced from the single source of truth. To
133133
```bash
134134
redocly bundle external@latest -o dist/bundle-external.yaml
135135
// or
136-
npx @redocly/cli bundle external@latest -o dist/bundle-external.yaml
136+
npx @redocly/cli@latest bundle external@latest -o dist/bundle-external.yaml
137137
```
138138

139139
Inspect the file at `dist/external.yaml`.
@@ -144,7 +144,7 @@ In this step, two API snapshots are produced from the single source of truth. To
144144
```bash
145145
redocly bundle internal@latest -o dist/bundle-internal.yaml
146146
// or
147-
npx @redocly/cli bundle internal@latest -o dist/bundle-internal.yaml
147+
npx @redocly/cli@latest bundle internal@latest -o dist/bundle-internal.yaml
148148
```
149149

150150
Inspect the file at `dist/internal.yaml`.

docs/guides/replace-servers-url.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ extends:
163163
1. Run the following command to bundle the `original.yaml` API with the "backend" server URL.
164164

165165
```shell
166-
npx @redocly/cli bundle sample@v1-backend
166+
npx @redocly/cli@latest bundle sample@v1-backend
167167
```
168168

169169
2. Verify that the output shows the correct server URL.
@@ -184,7 +184,7 @@ servers:
184184
1. Run the following command bundles the `original.yaml` API with the "proxy" server URL.
185185

186186
```shell
187-
npx @redocly/cli bundle sample@v1-proxy
187+
npx @redocly/cli@latest bundle sample@v1-proxy
188188
```
189189

190190
2. Verify that the output shows the correct server URL.

docs/installation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Running `redocly --version` confirms that the installation was successful, and t
2727
To run Redocly CLI with `npx`, the command looks like the following example:
2828

2929
```shell
30-
npx @redocly/cli <command> [options]
30+
npx @redocly/cli@latest <command> [options]
3131
```
3232

3333
For example, to run `redocly lint` on a file named `openapi.yaml`, use the following command:

0 commit comments

Comments
 (0)