You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/commands/generate-arazzo.md
+82-24Lines changed: 82 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,32 +2,25 @@
2
2
slug:
3
3
- /docs/cli/commands/generate-arazzo
4
4
- /docs/respect/commands/generate-arazzo
5
-
rbac:
6
-
authenticated: read
7
5
---
8
6
9
7
# `generate-arazzo`
10
8
11
9
Auto-generate an Arazzo description based on an OpenAPI description file.
12
10
13
-
If `examples` are provided in the OpenAPI description, they are used as input data for test requests.
14
-
If `schema` is provided, the config generates fake data based on the description schema.
15
-
By default, data for requests comes from the description at runtime.
16
-
To materialize tests with the data, use the `--extended` option.
17
-
18
-
The `--extended` option also demonstrates how Respect gets data from an OpenAPI description.
19
-
20
11
{% admonition type="warning" %}
21
12
22
13
Given the nature of OpenAPI, the generated Arazzo description is not a complete test file and may not function. Dependencies between endpoints are not resolved.
23
14
24
15
It acts as a starting point for a test file and needs to be extended to be functional.
25
16
{% /admonition %}
26
17
18
+
The first HTTP response is used as the success criteria for each step.
- Path to the OAS description file. If the file name is not provided, the default name is used - `auto-generate.yaml`. Example: `npx @redocly/cli generate-arazzo OAS-file.yaml -o=example.yaml`
38
+
- Path to the OAS description file. If the file name is not provided, the default name is used - `auto-generate.arazzo.yaml`. Example: `npx @redocly/cli generate-arazzo OAS-file.yaml -o=example.arazzo.yaml`
46
39
47
-
---
48
-
49
-
- --extended
50
-
- boolean
51
-
- By default, data for requests comes from the description at runtime. This option generates a test config file with data populated from the description. Example: `npx @redocly/cli generate-arazzo OAS-file.yaml -o=example.yaml --extended`.
40
+
{% /table %}
52
41
53
-
---
42
+
## Examples
54
43
55
-
- --with-expectations
56
-
- boolean
57
-
- By default, data for requests comes from the description at runtime. This option generates a test config file with data populated from the description with additional expectations. Example: `npx @redocly/cli generate-arazzo OAS-file.yaml -o=example.yaml --with-expectations`.
44
+
Run the command: `npx @redocly/cli generate-arazzo 'https://warp-single-sidebar.redocly.app/_spec/apis/index.yaml'`
45
+
46
+
The command generates a `auto-generate.arazzo.yaml` file in the current directory.
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 respect test-file.yaml --workflow first-flow second-flow`.
34
31
{% admonition type="warning" %}
35
32
The `--workflow` option can't be used with `--skip`.
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 respect test-file.yaml --skip first-flow`.
44
41
{% admonition type="warning" name="Warning" %}
45
42
The `--skip` option can't be used with `--workflow`.
- Runs the command in verbose mode to help with troubleshooting issues.
53
-
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 respect test-file.yaml --verbose`.
54
51
55
52
---
56
53
57
54
- --har-output
58
55
- string
59
56
- Path for the `har` file for saving logs.
60
-
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 respect test-file.yaml --har-output='logs.har'`.
61
58
62
59
---
63
60
64
61
- --json-output
65
62
- string
66
-
- 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 respect test-file.yaml --json-output='logs.json'`.
- Server overrides for the `sourceDescriptions` object.
84
-
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 respect test-file.yaml --server test=https://test.com`.
85
82
86
83
You can also pass the server overrides as an environment variable, as in the following example:
0 commit comments