Skip to content

Commit

Permalink
Version 2.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
arjun-g committed Apr 14, 2019
1 parent ad75d4c commit 4cd879c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Swagger Viewer - v2.2.0
# Swagger Viewer - v2.2.2
**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.
Expand Down Expand Up @@ -59,12 +59,16 @@ Swagger Viewer validates your documents against Swagger 2.0 and OpenAPI specific

## TODO
* Show all the errors during validation
* Add code complete support based on Swagger 2.0 and OpenAPI specifications
* Add code completion support based on Swagger 2.0 and OpenAPI specifications

## Releases

**v2.2.2 Changes**
* Fixed validation issue with external refs [#45](https://github.com/arjun-g/vs-swagger-viewer/issues/45) By [@yuri1969](https://github.com/yuri1969) [https://github.com/arjun-g/vs-swagger-viewer/pull/56](https://github.com/arjun-g/vs-swagger-viewer/pull/56)
* Fix for [#43](https://github.com/arjun-g/vs-swagger-viewer/issues/43) By [@joschiwald](https://github.com/joschiwald) [https://github.com/arjun-g/vs-swagger-viewer/pull/59](https://github.com/arjun-g/vs-swagger-viewer/pull/59)

**v2.2.1 Changes**
* Fixed the external refs issue #45
* Fixed the external refs issue [#45](https://github.com/arjun-g/vs-swagger-viewer/issues/45)

Known Issue
* Validator still gives a warning on relative paths. Will be fixed in next version.
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"theme": "dark"
},
"license": "SEE LICENSE IN LICENSE.md",
"version": "2.2.1",
"version": "2.2.2",
"publisher": "Arjun",
"engines": {
"vscode": "^1.25.0"
Expand Down Expand Up @@ -113,7 +113,7 @@
"swagger-parser": "^6.0.5",
"swagger-ui-dist": "^3.22.0",
"vscode-languageclient": "^4.1.4",
"vscode-languageserver": "^4.1.3"
"vscode-languageserver": "^4.4.2"
},
"bugs": {
"url": "https://github.com/arjun-g/vs-swagger-viewer/issues"
Expand Down
3 changes: 2 additions & 1 deletion src/language/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {
} from 'vscode-languageserver';
import * as SwaggerParser from 'swagger-parser';
import * as YAML from 'js-yaml';
import * as path from 'path';

const SWAGGER_CODE_COMPLTE_DEFS = [
/** TODO */
Expand Down Expand Up @@ -175,7 +176,7 @@ function validateSwagger(swagger: any, textDocument: TextDocument) {

function changeCurrentWorkDir(textDocument: TextDocument): void {
const documentPath = Files.uriToFilePath(textDocument.uri);
const documentDir = documentPath.substr(0, documentPath.lastIndexOf('/'));
const documentDir = path.dirname(documentPath);
// work dir == document base dir
process.chdir(documentDir);
}
Expand Down

0 comments on commit 4cd879c

Please sign in to comment.