Swagger Snippets
VSCode Snippets for writin OAS 3.0 compliant code snippets in YAML.
See it in action
Installation
- Open Extensions sidebar panel in Visual Studio Code.
View → Extensions - Search for
Swagger Snippets - Click Install
- When in YAML file just type in
swaand you can see the snippet suggestions.
Note If suggestions are not showing try pressing Ctlr + Space
Enjoy!
Available Snippets
| S. No. | Snippet | Output |
|---|---|---|
| 1 | swaoas | Adds basic skeleton for a OAS 3.0 file with Info, Server and Path |
| 2 | swapath | Basic Path Snippet |
| 3 | swapathparam | Path Snippet with parameters |
| 4 | swaresp | Response object snippet |
| 5 | swaparam | Parameter object snippet |
| 6 | swareqbody | Request body snippet |
| 7 | swaheader | Header object snippet |
| 8 | swaobj | Object properties snippet |
| 9 | swastr | String properties snippet |
| 10 | swadeprcted | Deprecated object snippet |

