Swagger Editor & OpenAPI Editing (Lint, Spec Preview, 3.1)

Swagger Editor & OpenAPI Editing (Lint, Spec Preview, 3.1), a VS Code extension by Zovo

Edit OpenAPI 3.1, 3.0 and Swagger 2.0 files in VS Code with lint you can read, quick fixes, IntelliSense and a live Swagger UI preview that follows your cursor. YAML or JSON. Free, no sign-in, works offline: no account, no telemetry, and nothing is sent unless you click Send in Try it out.

Install in VS CodeOpen the Marketplace page

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

An OpenAPI file in VS Code: lint problems with rule names below, and the live preview to the side showing the operation under the cursor

A real file (samples/lint-demo.yaml) in VS Code 1.142, dark theme. The cursor is in getOrder, so the preview scrolls to that operation and marks it. The Problems panel lists the lint results with their rule names.

Questions people ask

Is Swagger Editor & OpenAPI Editing (Lint, Spec Preview, 3.1) free?

Yes. Swagger Editor & OpenAPI Editing (Lint, Spec Preview, 3.1) is free and MIT licensed.

How do I install Swagger Editor & OpenAPI Editing (Lint, Spec Preview, 3.1)?

Click "Install in VS Code" above, or search for zovo.swagger-openapi-viewer in the Extensions view.

Start

  1. Open a .yaml or .json file that has openapi: or swagger: at the top. Lint runs at once; problems show in the Problems panel.
  2. Click the preview button at the top right of the editor, or press Shift+Alt+P.
  3. Move the cursor in the spec: the preview shows that operation or schema. Click an operation in the preview: the cursor goes to its line.

Right-click in a spec and open the OpenAPI menu for convert, bundle, compare, mock server and client code.

Why this one

The most installed OpenAPI extension is good, and it has many users. Its reviews and issues still list problems that this extension fixes. Each line below links the report and says what is different here; the real VS Code test of this release checks each one.

Reported problemHere
OpenAPI 3.1 does not work: a review from 28 Oct 2024 says "not working for OpenAPI Version 3.1.0"; issues 110 (open since 2021, 63 comments), issue 319 and issue 3693.1 is the default. webhooks, type: [string, "null"], jsonSchemaDialect, const, examples and license.identifier parse, lint and preview. The test file has all of them: 0 errors, webhook shown.
Multiline descriptions do not show in the preview: a review from 10 Jul 2024`description: \` blocks render as Markdown, with lists and line breaks, in both layouts.
A schema from another file shows its file path as its name in the preview: issue 194 (open)The bundler keeps the schema name (Pet, not a path) and puts it under components/schemas.
A split spec loses completions: issue 82 (open)$ref completion lists the files of your workspace and the components inside them. Go to definition and rename work across files.
The preview does not refresh: issue 199 (open)The preview updates while you type, and when you save any file the spec refers to.
"I see nothing better than online version": a review from 9 Mar 2025The preview follows the cursor, and a click in the preview moves the cursor. An online editor cannot jump to a line in your file.

This extension does not do an API security audit. That needs a security platform.

Lint with rules you can read

Problems with rule names and a quick fix in a spec

Edit

Preview

Convert, bundle, compare

Every change opens as a diff first. Nothing is written until you click Save as or Replace.

Convert Swagger 2.0 to OpenAPI 3.0: the diff before anything is written

Try it out, mock server, client code

Safety

The light theme: the reference layout follows the cursor to POST /parcels in a 3.1 file

Settings

SettingDefaultWhat it does
openapiViewer.lint.enabledtrueLint OpenAPI and Swagger files
openapiViewer.lint.whenPreviewClosedtrueAlso lint files that have no preview open
openapiViewer.preview.followCursortrueThe preview follows the cursor, a click in the preview moves the cursor
openapiViewer.defaultLayoutautoswagger, reference, or auto (reference for large specs)
openapiViewer.updateDelayMs400Wait after typing before the preview updates
openapiViewer.maxFileMB64Largest file that is read
openapiViewer.largeSpecMB3With auto, larger specs open in the reference layout
openapiViewer.remoteRefsaskask shows the Load remote refs button, never turns remote refs off
openapiViewer.tryItOutfalseShow Try it out in Swagger UI
openapiViewer.tryItOutAllowedHostslocal hostsHosts that Try it out may send to
openapiViewer.mock.port4010Port of the mock server on 127.0.0.1
openapiViewer.swaggerUi.docExpansionlistWhat Swagger UI opens at first
openapiViewer.showProblemsInEditortrueShow problems in the Problems panel and as squiggles

Privacy

The extension makes no network calls. The exceptions are your own clicks: Send in Try it out, Load remote refs, and Unlock with GitHub Sponsors if Zovo Pro is ever switched on for this extension (one call to GitHub). A license key is checked on your computer. The mock server listens on 127.0.0.1 only.

Free and Pro

Everything above is free today, including the breaking-change report, the mock server and client code. Opening, viewing, editing, lint, quick fixes, IntelliSense, the preview, Try it out, convert and bundle will stay free. Zovo Pro is USD 19 once on its GitHub Sponsors tier (https://github.com/sponsors/theluckystrike/sponsorships?tier_id=679878). If Pro is switched on later, it can cover only the breaking-change report, the mock server and client code.

Limits

Also on Open VSX, so it works in Cursor, Windsurf, VSCodium and other editors based on VS Code.

License

MIT. Swagger UI is Apache-2.0 and yaml is ISC; see THIRD-PARTY-NOTICES.md.

Guides

Install Swagger Editor & OpenAPI Editing (Lint, Spec Preview, 3.1)

Click the button to open VS Code and install it, or press Ctrl+P (Cmd+P on macOS) in VS Code and run ext install zovo.swagger-openapi-viewer.

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

Source code and issues are on GitHub.

All our VS Code extensions

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.