Skip to content

Commit

Permalink
fix: Fix #61 for Visual Studio 2017
Browse files Browse the repository at this point in the history
  • Loading branch information
unchase committed Oct 22, 2021
1 parent 40179bb commit 7e62e04
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 12 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
12 changes: 3 additions & 9 deletions src/Common/ProjectHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using EnvDTE80;
using Microsoft.VisualStudio;
using Microsoft.VisualStudio.Shell.Interop;
using Newtonsoft.Json.Linq;

namespace Unchase.OpenAPI.ConnectedService.Common
{
Expand Down Expand Up @@ -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<object>(input);
}
catch
{
return false;
}
return input.StartsWith("{") && input.EndsWith("}")
JToken.Parse(input);
return input.StartsWith("{") && input.EndsWith("}")
|| input.StartsWith("[") && input.EndsWith("]");
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]

2 changes: 1 addition & 1 deletion src/source.extension.vsixmanifest
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
<Metadata>
<Identity Id="Unchase.Openapi.ConnectedService.63199638-6211-4285-ba8f-75b1f0326c2a" Version="1.6.7" Language="en-US" Publisher="Unchase" />
<Identity Id="Unchase.Openapi.ConnectedService.63199638-6211-4285-ba8f-75b1f0326c2a" Version="1.6.8" Language="en-US" Publisher="Unchase" />
<DisplayName>Unchase OpenAPI (Swagger) Connected Service</DisplayName>
<Description xml:space="preserve">Connected service for Visual Studio to generate OpenAPI (Swagger) web service reference.</Description>
<MoreInfo>https://github.com/unchase/Unchase.OpenAPI.Connectedservice</MoreInfo>
Expand Down

0 comments on commit 7e62e04

Please sign in to comment.