Skip to content

Commit 59c7b8e

Browse files
docs: update respect server option docs (#2034)
1 parent 5db2ea7 commit 59c7b8e

File tree

1 file changed

+39
-13
lines changed

1 file changed

+39
-13
lines changed

docs/commands/respect.md

Lines changed: 39 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,10 @@ npx @redocly/cli@latest respect <your-test-file | multiple files | files bash qu
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@latest 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:
31+
32+
`npx @redocly/cli@latest respect test-file.yaml --workflow first-flow second-flow`
33+
3134
{% admonition type="warning" %}
3235
The `--workflow` option can't be used with `--skip`.
3336
{% /admonition %}
@@ -37,7 +40,10 @@ npx @redocly/cli@latest respect <your-test-file | multiple files | files bash qu
3740
- -s, --skip
3841
- [string]
3942
- 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@latest respect test-file.yaml --skip first-flow`.
43+
For example, the following command skips the "first-flow" workflow from the `test-file.yaml` Arazzo description:
44+
45+
`npx @redocly/cli@latest respect test-file.yaml --skip first-flow`
46+
4147
{% admonition type="warning" name="Warning" %}
4248
The `--skip` option can't be used with `--workflow`.
4349
{% /admonition %}
@@ -47,41 +53,60 @@ npx @redocly/cli@latest respect <your-test-file | multiple files | files bash qu
4753
- -v, --verbose
4854
- boolean
4955
- 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@latest respect test-file.yaml --verbose`.
56+
For example, the following command runs all workflows from the `test-file.yaml` Arazzo description in verbose mode:
57+
58+
`npx @redocly/cli@latest respect test-file.yaml --verbose`
5159

5260
---
5361

5462
- --har-output
5563
- string
5664
- 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@latest respect test-file.yaml --har-output='logs.har'`.
65+
For example, the following command runs all workflows from the `test-file.yaml` Arazzo description and saves the logs to the `logs.har` file:
66+
67+
`npx @redocly/cli@latest respect test-file.yaml --har-output='logs.har'`
5868

5969
---
6070

6171
- --json-output
6272
- 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@latest respect test-file.yaml --json-output='logs.json'`.
73+
- 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:
74+
75+
`npx @redocly/cli@latest respect test-file.yaml --json-output='logs.json'`
6476

6577
---
6678

6779
- --input
6880
- string
6981
- 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@latest respect test.yaml --input [email protected] --input userPassword=12345`.
71-
You can also use an environment variable to set the input, as in the following example: `REDOCLY_CLI_RESPECT_INPUT='[email protected],userPassword=12345' npm run cli respect test.yaml`
82+
For example, the following command maps the "userEmail" and "userPassword" inputs and values to all workflows in the `test.yaml` Arazzo description:
83+
84+
`npx @redocly/cli@latest respect test.yaml --input [email protected] --input userPassword=12345`
7285

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`
86+
You can also use an environment variable to set the input, as in the following example:
87+
88+
`REDOCLY_CLI_RESPECT_INPUT='[email protected],userPassword=12345' npm run cli respect test.yaml`
89+
90+
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:
91+
92+
`npx @redocly/cli@latest respect test-file.yaml --input '{"key": "value", "nested": {"nestedKey": "nestedValue"}}'`
93+
94+
You can also use an environment variable to set the input, as in the following example:
95+
96+
`REDOCLY_CLI_RESPECT_INPUT='{"key":"value","nested":{"nestedKey":"nestedValue"}}' npx @redocly/cli@latest respect test-file.yaml`
7597

7698
---
7799

78100
- --server
79101
- string
80102
- 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@latest respect test-file.yaml --server test=https://test.com`.
103+
For example, the following command runs all workflows from the `test-file.yaml` Arazzo description and instead of using the servers listed in the API description, uses the specified servers:
104+
105+
`npx @redocly/cli@latest respect test-file.yaml --server sourceDescriptionName1=https://test.com --server sourceDescriptionName2=https://test2.com`
82106

83-
You can also pass the server overrides as an environment variable, as in the following example:
84-
`REDOCLY_CLI_RESPECT_SERVER="test=https://test.com"`.
107+
You can also pass multiple server overrides as an environment variable by separating them with commas, as in the following example:
108+
109+
`REDOCLY_CLI_RESPECT_SERVER="sourceDescriptionName1=https://test.com,sourceDescriptionName2=https://test2.com"`
85110

86111
---
87112

@@ -113,7 +138,8 @@ npx @redocly/cli@latest respect <your-test-file | multiple files | files bash qu
113138
{% /admonition %}
114139

115140
For example, the following command sets status code errors to the warning severity level:
116-
`npx @redocly/cli respect test-file.yaml --severity='{"STATUS_CODE_CHECK":"warn"}'`.
141+
142+
`npx @redocly/cli respect test-file.yaml --severity='{"STATUS_CODE_CHECK":"warn"}'`
117143

118144
{% /table %}
119145

0 commit comments

Comments
 (0)