Redocly OpenAPI is a Visual Studio Code extension that helps you write, validate, and maintain your OpenAPI documents. It warns about errors in OpenAPI definitions and lets you quickly access referenced schemas or open the files that contain them. The extension works with OpenAPI 2.0 and 3.0 definitions, and has basic support for OpenAPI 3.1.
Feature highlights:
- Validate your OpenAPI definitions
- Quickly preview and access referenced schemas
- Work with multi-file definitions
- Preview API documentation side-by-side with your OpenAPI definition
- Access context-aware help about OpenAPI features
- Edit API definitions through interactive forms
If you provide a
redocly.yaml
configuration file, it must be located in the root directory of your workspace. If you don't have a custom configuration, the extension will automatically use the recommended ruleset. For setup instructions, see the Configuration section.Note that the extension only works with YAML files. Validation for JSON files is supported starting with version 0.2.0 of the extension.
An API key from Redocly is required to use the live documentation preview feature in the extension.
Functionality of the extension may be affected by some limitations of the VS Code editor. So far, we have identified these limitations:
- Special characters
/
,$
and#
do not trigger VS Code suggestions - VS Code doesn't suggest values while inside a snippet
- Special characters
To start using Redocly OpenAPI in your VS Code editor:
Create a
redocly.yaml
configuration file, or let the extension automatically generate one for you. If you don't provide a custom configuration, the extension will use the default settings.Open an existing OpenAPI document in VS Code, or create a new one from the template.
Relax while the extension validates your OpenAPI documents automatically!
If you suspect the extension is not working properly, make sure the following conditions are true:
- the extension is enabled in the current VS Code workspace (or globally),
- the
redocly.yaml
configuration file is located in your workspace root and it is not empty, - your API definition file is in the YAML format.
Interactive forms are supported only for
info
,server
, andexternalDocs
sections in the current version.Autocompletion support is limited in the current version.
The
redocly.yaml
file must be saved to disk (Ctrl+S) for changes to apply.
If you encounter issues with the extension that you're not able to resolve, report them in our Redocly VS Code GitHub repository.
The Contributing guide in the repository contains detailed guidelines for reporting issues.