diff --git a/CHANGELOG.md b/CHANGELOG.md index 77ce2f6..06c4f21 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ These are the changes to each version that has been released on the official [Visual Studio extension gallery](https://marketplace.visualstudio.com/items?itemName=unchase.UnchaseOpenAPIConnectedService). +## v1.6.8 `(2021-10-22)` + +- [x] Fix [issue #61](https://github.com/unchase/Unchase.OpenAPI.Connectedservice/issues/61) for Visual Studio 2017 + ## v1.6.7 `(2021-10-22)` - [x] Another fix [issue #61](https://github.com/unchase/Unchase.OpenAPI.Connectedservice/issues/61) diff --git a/src/Common/ProjectHelper.cs b/src/Common/ProjectHelper.cs index fbfb085..5e5de5d 100644 --- a/src/Common/ProjectHelper.cs +++ b/src/Common/ProjectHelper.cs @@ -4,6 +4,7 @@ using EnvDTE80; using Microsoft.VisualStudio; using Microsoft.VisualStudio.Shell.Interop; +using Newtonsoft.Json.Linq; namespace Unchase.OpenAPI.ConnectedService.Common { @@ -68,15 +69,8 @@ public static string GetFilePath(this ProjectItem item) internal static bool IsJson(string input) { input = input.Trim(); - try - { - System.Text.Json.JsonSerializer.Deserialize(input); - } - catch - { - return false; - } - return input.StartsWith("{") && input.EndsWith("}") + JToken.Parse(input); + return input.StartsWith("{") && input.EndsWith("}") || input.StartsWith("[") && input.EndsWith("]"); } } diff --git a/src/Properties/AssemblyInfo.cs b/src/Properties/AssemblyInfo.cs index c51faa1..ce470cd 100644 --- a/src/Properties/AssemblyInfo.cs +++ b/src/Properties/AssemblyInfo.cs @@ -30,7 +30,7 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.2.*")] -[assembly: AssemblyVersion("1.6.7")] -[assembly: AssemblyFileVersion("1.6.7.0")] +[assembly: AssemblyVersion("1.6.8")] +[assembly: AssemblyFileVersion("1.6.8.0")] [assembly: NeutralResourcesLanguage("en-US")] diff --git a/src/source.extension.vsixmanifest b/src/source.extension.vsixmanifest index 690c413..650d747 100644 --- a/src/source.extension.vsixmanifest +++ b/src/source.extension.vsixmanifest @@ -1,7 +1,7 @@  - + Unchase OpenAPI (Swagger) Connected Service Connected service for Visual Studio to generate OpenAPI (Swagger) web service reference. https://github.com/unchase/Unchase.OpenAPI.Connectedservice