/vs-swagger-viewer

Swagger Viewer for Visual Studio Code

Primary LanguageJavaScriptMIT LicenseMIT

Swagger Viewer - v1.5.0

Swagger Viewer lets you preview swagger files as you type in Visual Studio Code.

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

Swagger Preview

Opening In External browser

If you want to preview the changes in external browser change the settings swaggerViewer.previewInBrowser to true

Swagger Settings

THEN

  • Run the Command Preview Swagger.

OR

  • Press Shift + Alt + P

THEN

  • Either:
    1. 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.
    2. Click on Open to open the preview in your default browser.

Change Default Port

Default port of the preview url can be changed by changing the swaggerViewer.defaultPort value in User/Workspace Settings

v1.5.0 Changes

v1.4.0 Changes

  • Fixed - Preview of JSON Swagger files not getting updated in realtime. - By @tmsns
  • Fixed - Preview window in vs code not switching to latest file.
  • Added - File name in preview window to identify which file is in preview.
  • Some performance fixes

v1.3.0 Changes

  • Added - Now preview swagger inside the editor itself. - By @ferreus arjun-g#7
  • Added - Preview inside editor by default

v1.2.0 Changes

  • Added - Open button in message box. - By @pmentz arjun-g#3
  • Added - shortcut Shift + Alt + P to run the command
  • Added - Ability to change default port from User/Workspace Settings.

Credits

Swagger Viewer utilizes the following open source projects

Contributors