It works on swagger files in json and yaml format. Preview happens in real time as you type.
To start
- Open the swagger file and press F1.
- Run the Command
Preview Swagger
.
OR
- Press
Shift + Alt + P
THEN
- Preview It in the editor Itself like this
If you want to preview the changes in external browser change the settings swaggerViewer.previewInBrowser
to true
THEN
- Run the Command
Preview Swagger
.
OR
- Press
Shift + Alt + P
THEN
- Either:
- Copy the URL shown in the message box. (Eg. https://localhost:9000/)
- Open in any latest browser and see your changes reflecting in real time as you type in the editor.
- Click on
Open
to open the preview in your default browser.
- Copy the URL shown in the message box. (Eg. https://localhost:9000/)
Default port of the preview url can be changed by changing the swaggerViewer.defaultPort
value in User/Workspace Settings
v1.2.0 Changes
- Added
Open
button in message box. (By @pmentz arjun-g#3 - Added shortcut
Shift + Alt + P
to run the command - Ability to change default port from
User/Workspace Settings
.
v1.3.0 Changes
- Now preview swagger inside the editor itself. (By @ferreus arjun-g#7
- Preview iside editor by default
Swagger Viewer utilizes the following open source projects