Files
redocly-cli/docs/quickstart.md
Lorna Jane Mitchell 0455569a39 Docs: top-level refresh and restructure (#1043)
* docs: Start with a more developer and purpose oriented landing page

* docs: Clear installation options, autocomplete is a separate guide

* docs: update links in installation guide

* docs: Move update instructions to be a guide, remove local installation

* docs: Remove git documentation from starter project

* docs: Add a quicker quickstart

* docs: Re-organise and flesh out commands page

* docs: add built-in ruleset docs, add concept, start guide

* docs: Add a guide for configuring linting

* Docs: rename custom rules to assertions

* docs: Sort assertion docs and examples alphabetically

* docs: clearer linting explanations and signposting of rule types

* Apply suggestions from code review

Co-authored-by: Adam Altman <adam@redoc.ly>

* docs: Remove reference to a  config object, after user confusion

* docs: Add docs-building entrypoint article

* docs: Add one-line descriptions alongside rule names

* fix: Correct images for docs overview page

* docs: Link to custom function in custom plugin docs

* fix: Links in rules need updating after this file moved

* docs: Add concept article for openapi file wrangling

* docs: assertions are now called configurable rules

* fix: Broken links and a renamed file

* docs: Titles, links, and restructuring

* Apply suggestions from code review

Co-authored-by: Adam Altman <adam@redoc.ly>

* fix: Redirect for renamed CLI update guide

* Apply suggestions from code review

Co-authored-by: Adam Altman <adam@redoc.ly>

* chore: reduce filesize of images

* docs: Detangle the custom/configurable rules vs assertions confusion

* fix: labels as well as links to configurable rules

* Update docs/guides/configure-rules.md

Co-authored-by: Adam Altman <adam@redoc.ly>

* fix: Better example wording and fix title case

* Update docs/commands/index.md

Co-authored-by: Adam Altman <adam@redoc.ly>

* Update docs/rules/recommended.md

Co-authored-by: Adam Altman <adam@redoc.ly>

* Update docs/quickstart.md

Co-authored-by: Adam Altman <adam@redoc.ly>

* Update docs/rules.md

Co-authored-by: Adam Altman <adam@redoc.ly>

* chore: rename file built-in-rules.md and corresponding links (#1075)

---------

Co-authored-by: Adam Altman <adam@redoc.ly>
2023-05-10 17:40:59 +01:00

1.6 KiB

Redocly CLI quickstart guide

Take your first steps with the Redocly CLI by following the steps in this guide.

Before you start:

:::attention There's also an openapi-starter repository that you can clone and experiment with to get your bearings :::

Preview API documentation

Redocly CLI has support for showing a preview of Redoc rendering your API docs, which updates when the API description updates. Run the command:

redocly preview-docs openapi.yaml

The output takes a few moments to build, and then lets you know the host and port where the preview server is running - usually http://localhost:8080.

Open that URL in your browser, and admire your lovely API documentation!

Preview of API documentation

Lint an OpenAPI description

The lint command is used to check that the OpenAPI description is compliant with a set of rules. You can define your own rules if you want to be specific, but to get started, try this:

redocly lint --extends minimal openapi.yaml

The output shows any aspects where the OpenAPI doesn't meet the standard. If you get too much output, try adding the --format summary parameter to the command.

Feeling brave and highly API compliant? Try the recommended standard instead and see how yours measures up.