OpenAPI extension for Visual Studio Code
This Visual Studio Code (VS Code) extension adds rich support for the OpenAPI Specification (OAS) (formerly known as Swagger Specification) in JSON or YAML format. The features include, for example, IntelliSense, linting, schema enforcement, code navigation, definition links, snippets, and more!
Both OAS v2 and v3 are supported.
After installing the plugin, open any JSON or YAML file that contains an API definition following OAS v2 or OAS v3 in VS Code. The plugin automatically detects that this is an OpenAPI file, and the OpenAPI button is shown in the left-hand panel.
Create new OpenAPI files
Add new elements in the OpenAPI explorer
As you start typing OpenAPI elements or their values, the context-sensitive list of available options is displayed in the IntelliSense menu. In JSON OpenAPI files, just type double-quote (
You can also use the corresponding VS Code hotkey (Ctrl+Space on Windows, Cmd+Space on Mac) to forse-open the IntelliSense menu.
Go to definition
To jump to view the definition from a reference in your API, either Ctrl+click a reference, or right-click a reference and click Go to Definition in the shortcut menu.
When you have a minute PLEASE submit your feedback and feature requests at this superquick survey.
Submit your bug reports at GitHub project Issues.
Add needless to say that your reviews at VS Code marketplace mean the world to us.