Skip to content

tmsns/vs-swagger-viewer

 
 

Repository files navigation

Swagger Viewer

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 Preview

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.

Swagger Preview

Change Default Port

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

Swagger Preview 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

Credits

Swagger Viewer utilizes the following open source projects

Contributors

About

Swagger Viewer for Visual Studio Code

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • HTML 77.5%
  • JavaScript 22.0%
  • CSS 0.5%