-
Notifications
You must be signed in to change notification settings - Fork 7
docs(respect): fix incorrect CLI commands and filenames in guides #261
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,7 +20,7 @@ Make sure you have the following before you begin: | |
| To get a sense of the API, preview it by running the following command, and then clicking on the link generated to your localhost. | ||
|
|
||
| ```shell | ||
| npx @redocly/cli preview demo.yaml | ||
| npx @redocly/cli preview | ||
| ``` | ||
|
|
||
| After you review the docs, you can use control-c in your terminal to stop the preview. | ||
|
|
@@ -36,7 +36,7 @@ The following command generates a test description to use with the example API t | |
| npx @redocly/cli generate-arazzo demo.yaml | ||
| ``` | ||
|
|
||
| You'll find the output in a file named `auto-generated.yaml`. Take a moment to examine the test description and you will notice that each operation from the OpenAPI file now has a workflow entry like the following example: | ||
| You'll find the output in a file named `auto-generated.arazzo.yaml`. Take a moment to examine the test description and you will notice that each operation from the OpenAPI file now has a workflow entry like the following example: | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. $ npx @redocly/cli generate-arazzo demo.yaml
Generating Arazzo description...
Arazzo description auto-generated.arazzo.yaml successfully generated.$ npx @redocly/cli respect auto-generated.yaml --verbose
ENOENT: no such file or directory '/Users/xxx/xxx/auto-generated.yaml' |
||
|
|
||
| ```yaml | ||
| - workflowId: get-workflow | ||
|
|
@@ -52,7 +52,7 @@ You can use these starter tests as a basic validation step for an API to check t | |
| Using the generated test file, the following command checks the live API against the behavior described by OpenAPI: | ||
|
|
||
| ```sh | ||
| npx @redocly/cli respect auto-generated.yaml --verbose | ||
| npx @redocly/cli respect auto-generated.arazzo.yaml --verbose | ||
| ``` | ||
|
|
||
| The tests complete successfully but if you look closely you may notice that all the requests we sent were unauthenticated. | ||
|
|
@@ -71,7 +71,7 @@ The next step is to add authentication information and run the tests again with | |
| To test the behavior of the API when authentication is supplied, it must be added to the workflow file. | ||
| Since it's not good practice to add secrets directly to a file that is stored in source control, this example uses an environment variable. | ||
|
|
||
| Open the `auto-generated.yaml` file in your IDE or text editor. | ||
| Open the `auto-generated.arazzo.yaml` file in your IDE or text editor. | ||
| Add the following lines to the file to each workflow (at the same level as `workflowId` and `steps`) to set the authentication header to use, and to describe that the value comes from the `IMFKEY` environment variable: | ||
|
|
||
| ```yaml | ||
|
|
@@ -93,7 +93,7 @@ inputs: | |
| Run the tests again and supply the input value to the CLI, as shown in the following example: | ||
|
|
||
| ```sh | ||
| npx @redocly/cli respect auto-generated.yaml --input IMFKEY=abc | ||
| npx @redocly/cli respect auto-generated.arazzo.yaml --input IMFKEY=abc | ||
| ``` | ||
|
|
||
| You can use this exact command, including the value of the environment variable, because the demo API accepts these credentials. | ||
|
|
@@ -112,7 +112,7 @@ This ability to focus is very useful when you need more context to understand a | |
| The following command runs the tests in `--verbose` mode for only that specific failed flow using the `--workflow` parameter: | ||
|
|
||
| ```sh | ||
| npx @redocly/cli respect auto-generated.yaml --verbose \ | ||
| npx @redocly/cli respect auto-generated.arazzo.yaml --verbose \ | ||
| --workflow get-users-{id}-workflow | ||
| ``` | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$ npx @redocly/cli preview demo.yaml redocly preview Preview Redocly project using one of the product NPM packages. Options: --version Show version number. [boolean] --help Show help. [boolean] --product Product used to launch preview. Default is in ferred from project's package.json or 'realm' is used. [string] [choices: "redoc", "revel", "reef", "realm", "redoc-revel", "redoc-re ef", "revel-reef"] --plan [string] [choices: "pro", "enterprise"] [default: "enterprise"] -p, --port Preview port. [number] [default: 4000] -d, --project-dir, --source-dir Specifies the project content directory. The default value is the directory where the comm and is executed. [string] [default: "."] --lint-config Severity level for config file linting. [choices: "warn", "error", "off"] [default: "warn"] Unknown argument: demo.yaml