Skip to content
| Marketplace
Sign in
Visual Studio Code>Snippets>Swagger ToolsNew to Visual Studio Code? Get it now.
Swagger Tools

Swagger Tools

The Holy Coder

|
54,723 installs
| (3) | Free
Automating openAPI specs from your editor.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Swagger Tool

Buy Me A Coffee

A VSCode extension that scaffolds openAPI (swagger) specs from your editor. Get it on the VSCode Marketplace.

Got any feedback, issues or feature requests? Send them my way via GitHub Issues.

  • Swagger Tools
    • Commands
    • Settings
    • Features
      • Generate & Paste Schema Object
      • Generate Components
    • Upcoming Features
      • Scaffold New Spec
      • Generate Components Continued...
      • Generate Paths
      • More to come...
    • Author
      • Contributors

See the CHANGELOG for the latest changes.

Commands

Command name Description Shortcut
swagger-tools.pasteSchema Generates an openAPI schema from an object or array in the clipboard ctrl/cmd + alt + v
swagger-tools.addComponent Adds an openAPI schema into the components spec field (optionally generated from clipboard) ctrl/cmd + alt + c

Settings

Settings → Extensions → Swagger Tools

Setting Description Allowed Values
swagger-tools.arrayType Specify the type of array you want auto generated "anyOf", "oneOf", "allOf", "not"

Features

Generate & Paste Schema Object

  1. Copy the object or array you would like to generate
  2. Go to the desired openAPI spec file
  3. Place your cursor where you would like to paste your schema
  4. Paste by typing the macro ctrl/cmd + alt + v

Paste Schema - Gif

Generate Components

Select from a list of components to generate fully scaffolded schemas. The schemas will be auto inserted in its proper field.

  • Schemas

  1. Copy the object or array you would like to generate as a component schema
  2. Go to the desired openAPI spec file
  3. Paste by typing the macro ctrl/cmd + alt + c
  4. Fill out schema info in command pallette

Add Component: Schema - Gif

Upcoming Features

The upcoming features list is order by expected release date...

Scaffold New Spec

An easy and quick set up for anyone on the team.

  • Scaffold a new spec from scratch
  • Choose between a complex or basic spec

Generate Components Continued...

Select from a list of components to generate fully scaffolded schemas. The schemas will be auto inserted in its proper field.

Upcoming Releases:

  • responses
  • parameters
  • examples
  • requestBodies
  • headers
  • securitySchemes
  • links
  • callbacks

Generate Paths

Fully generate paths with all their required fields.

  • GET, POST, PUT, PATCH, DELETE

More to come...

  • Auto populate paths with request bodies, params, responses, etc...
  • Linting
  • Error decorators

Author

Created and sustained by Aaron Turkel (a.k.a. The Holy Coder).

Contributors

Have an idea that could make Swagger Tools better? Contribute!

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft