Swagger Viewer - v3.0.0
Swagger Viewer lets you preview Swagger 2.0 and OpenAPI files as you type in Visual Studio Code. Additionally provide intellisense/linting for the files as well.
It works on swagger files in json and yaml format. Preview happens in real time as you type.
- Open the swagger file and press F1.
- Run the Command
- Right click file in explorer panel and click
- Preview it in vscode Itself like this
Opening In External browser
If you want to preview the changes in external browser change the settings
Preview In Browser to
- Run the Command
Preview will be automatically opened in default browser.
Change Default Port
Default port of the preview url can be changed by changing the
Default Port value in
Show Only File Name
In the preview title the file name along with the full path is displayed by default. It can be changed to show only the file name by changing the
Show Only File Name to
Change Default Host
Default host(localhost) of the preview url can be changed by changing the
swaggerViewer.defaultHost value in
Stop Swagger Viewer Preview Server
To stop the preview server simply click the status bar item.
- The primary functionality of the Swagger Viewer extension would be the ability to preview Swagger and OpenAPI files.
- Swagger Viewer will just use the json schema of Swagger and OpenAPI to provide intellisense and linting. Recommend using teh extension OpenAPI (Swagger) Editor for full editing capabilities.
- Intellisense for Swagger 2.0 and OpenAPI 3.0 is available now. Added extension YAML as extensionDependencies for supporting YAML intellisense.
- Default port changed to 18512
- Upgraded swagger-ui to version 3.25.2
- Start preview server in next available port for preview if configured port is not available
- Fix for custom host config
- Ability to stop the preview server
- Fixed the external refs issue #45
- Validator still gives a warning on relative paths. Will be fixed in next version.
- Fixed issues with parsing yaml due in yamljs library. Changed to js-yaml library.
- Fixed issue where validation errors are not cleared in yaml file.
- 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 https://github.com/arjun-g/vs-swagger-viewer/pull/36
- Multiple minor bug fixes
- 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
Swagger Viewer utilizes the following open source projects