Open files in VS Code and Cursor / Code and APIs

Preview a Swagger or OpenAPI file in VS Code

VS Code shows an OpenAPI file as plain YAML or JSON. Install the free Swagger Viewer & OpenAPI Viewer by Zovo, open the spec and press Shift+Alt+P. A Swagger UI preview opens beside the editor and updates while you type. It reads OpenAPI 3.1, 3.0 and Swagger 2.0, follows $ref links to other files in your workspace, and needs no local server.

Install in VS CodeMarketplace pageOpen VSX (Cursor, Windsurf, VSCodium)JetBrains IDEs

Free, MIT license. Extension ID zovo.swagger-openapi-viewer, version 0.3.2. Needs VS Code 1.90.0 or newer.

An OpenAPI 3.1 file in VS Code with its live Swagger UI preview to the side, showing the API title, a pricing table and the POST /tickets operation
An OpenAPI 3.1 file in VS Code with its live Swagger UI preview to the side, showing the API title, a pricing table and the POST /tickets operation.

Steps in VS Code

  1. Install Swagger Viewer & OpenAPI Viewer from the Marketplace, or press Ctrl+P (Cmd+P on macOS) and run ext install zovo.swagger-openapi-viewer.
  2. Open a YAML or JSON file that starts with openapi: or swagger:.
  3. Click the preview button at the top right of the editor, or press Shift+Alt+P. You can also right-click the file in the Explorer and pick Open Preview to the Side.
  4. Switch between Swagger UI and the Reference layout in the toolbar. The Reference layout shows the operation list, the details and a curl line with examples.
  5. Press / to filter by path, tag, summary or operationId. Click a problem in the Problems list to jump to the line.

Steps in Cursor, Windsurf or VSCodium

  1. Open the Extensions view with Ctrl+Shift+X (Cmd+Shift+X on macOS).
  2. Search for zovo.swagger-openapi-viewer and click Install. Cursor, Windsurf and VSCodium install from Open VSX, where it is published as zovo/swagger-openapi-viewer.
  3. If your editor has no gallery, download the .vsix from the Open VSX page and run "Extensions: Install from VSIX...".
  4. Then use it the same way as in VS Code.

What Swagger Viewer & OpenAPI Viewer handles

What it does not do

In JetBrains IDEs (IntelliJ IDEA, PyCharm, WebStorm, CLion and others)

Other options

Install counts and Open VSX status were checked on 9 November 2026. Descriptions in quotes are the extensions' own.

Questions

Does it work with specs split over many files?

Yes. Relative $ref links are read from your workspace and joined into one document. Refs outside the workspace, absolute paths and file: URLs are not read.

Does the preview send requests to my API?

No. Try it out is off by default. If you turn on openapiViewer.tryItOut, VS Code asks you to confirm each server before a request goes out.

Do I need an account or an API key?

No. It needs no sign-in, no local server and no port. The preview makes no network requests unless you click Load remote refs.

More about Swagger Viewer & OpenAPI Viewer

Read the Swagger Viewer & OpenAPI Viewer page for every feature and setting, or the source code on GitHub.

Zovo Pro and support

Zovo Pro: USD 19 once, every Zovo viewer. It turns on the Pro tools in this extension and in the other Zovo extensions you use. The free features stay free.

After a card payment your license key shows on the next page. Paste it with the command "Zovo Pro: Enter a key".

You can also support the work with no Pro:

Need your format supported?

Open a format request with a sample file, and I reply there whether it can be done. For USD 299 once, through this GitHub Sponsors tier, I add your file format or a missing feature to this extension, with tests, within 7 days.