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.
See the CHANGELOG for the latest changes.
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 → Extensions → Swagger Tools
Setting | Description | Allowed Values |
---|---|---|
swagger-tools.arrayType | Specify the type of array you want auto generated | "anyOf", "oneOf", "allOf", "not" |
- Copy the object or array you would like to generate
- Go to the desired openAPI spec file
- Place your cursor where you would like to paste your schema
- Paste by typing the macro
ctrl/cmd + alt + v
Select from a list of components to generate fully scaffolded schemas. The schemas will be auto inserted in its proper field.
- Copy the object or array you would like to generate as a component schema
- Go to the desired openAPI spec file
- Paste by typing the macro
ctrl/cmd + alt + c
- Fill out schema info in command pallette
The upcoming features list is order by expected release date...
An easy and quick set up for anyone on the team.
- Scaffold a new spec from scratch
- Choose between a complex or basic spec
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
Fully generate paths with all their required fields.
GET, POST, PUT, PATCH, DELETE
- Auto populate paths with request bodies, params, responses, etc...
- Linting
- Error decorators
Created and sustained by Aaron Turkel (a.k.a. The Holy Coder).
Have an idea that could make Swagger Tools better? Contribute!