Fixed issue where validation errors are not cleared in yaml file.Fixed issues with parsing yaml due in yamljs library.Added support for OpenAPI 3.0.3 validation - By.Added configuration option to show only file name in title.Replaced the deprecated vscode.previewHtml with Webview - #50.Support to configure default preview host (instead of localhost) - By.Validator still gives a warning on relative paths.Fixed validation issue with external refs #45 By.Start preview server in next available port for preview if configured port is not available.Added extension YAML as extensionDependencies for supporting YAML intellisense. Intellisense for Swagger 2.0 and OpenAPI 3.0 is available now.
Recommend using teh extension OpenAPI (Swagger) Editor for full editing capabilities. Swagger Viewer will just use the json schema of Swagger and OpenAPI to provide intellisense and linting.The primary functionality of the Swagger Viewer extension would be the ability to preview Swagger and OpenAPI files.To stop the preview server simply click the status bar item. It can be changed to show only the file name by changing the Show Only File Name to true in User/Workspace Settings Change Default Hostĭefault host(localhost) of the preview url can be changed by changing the faultHost value in User/Workspace Settings Stop Swagger Viewer Preview Server In the preview title the file name along with the full path is displayed by default. Change Default Portĭefault port of the preview url can be changed by changing the Default Port value in User/Workspace Settings Show Only File Name Preview will be automatically opened in default browser. If you want to preview the changes in external browser change the settings Preview In Browser to true in User/Workspace Settings Right click file in explorer panel and click Preview Swagger.Preview happens in real time as you type. It works on swagger files in json and yaml format. Additionally provide intellisense/linting for the files as well. You can change the API visibility later if needed.Swagger Viewer lets you preview Swagger 2.0 and OpenAPI files as you type in Visual Studio Code. Private APIs can be accessed only by you and by the people you added as collaborators). Public APIs are visible to anyone, even to people without a SwaggerHub account. Visibility – Choose whether to make the API public or private. The list contains existing projects available to you. Project – If an organization is selected as the Owner, you can optionally select a project to add this API to. Members with the Designer role have “create” permissions if the organization is configured with the Allow Designers to Create APIs under the Organization option. Organization owners can always create APIs in that organization. Organization-owned APIs count toward the organization’s limits rather than yours. The API owner is part of the API path in SwaggerHub: owner/api-name/1.0. Owner – Choose whether to create the API in your personal or organization account (if you are a member of an organization on SwaggerHub). See the examples below for tips on importing definitions from Swagger UI, GitHub, and other websites. To upload a file from your computer, click Browse. Path or URL – The URL or local path of the API definition to import.