beastoin / vs-swagger-viewer

Swagger Viewer lets you preview and validate Swagger 2.0 and OpenAPI files as you type in Visual Studio Code.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Swagger Viewer - v2.0.0

Swagger Viewer lets you preview and validate Swagger 2.0 and OpenAPI files as you type in Visual Studio Code.

It works on swagger files in json and yaml format. Preview and validation happens in real time as you type.

Preview

To start

  • Open the swagger file and press F1.
  • Run the Command Preview Swagger.

OR

  • Press Shift + Alt + P

OR

  • Right click file in explorer panel and click Preview Swagger

THEN

  • Preview it in vscode Itself like this

Swagger Preview

Swagger Context Menu

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

Preview will be automatically opened in default browser.

Change Default Port

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

Validation (Partial)

Swagger Viewer validates your documents against Swagger 2.0 and OpenAPI specifications. If there are any issues it will be shown as a warning in the problems panel. Right now only one validation error will be shown even if there are multiple issues.

Swagger Validation

TODO

  • Show all the errors during validation
  • Add code complete support based on Swagger 2.0 and OpenAPI specifications

Releases

v2.0.0 Changes

  • Code base changed to TypeScript
  • Partial validation support added
  • OpenAPI Support added (Not fully tested)
  • Only one server runs for the preview page
  • Multiple files can be previewed at a time inside vscode
  • Context menu added to the explorer to start the preview directly without opening the file
  • Using files from swagger-ui-dist npm package - By @Raptor399 arjun-g#36
  • Multiple minor bug fixes

v1.7.0 Changes

v1.6.0 Changes

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

About

Swagger Viewer lets you preview and validate Swagger 2.0 and OpenAPI files as you type in Visual Studio Code.

License:MIT License


Languages

Language:TypeScript 76.0%Language:HTML 24.0%