Skip to content

Commit f0581a7

Browse files
committed
build(nuget): Update dependencies: add support for Microsoft.OpenApi.OData v1.0.6
1 parent 3005de2 commit f0581a7

8 files changed

+34
-11
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77

88
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).
99

10+
## v1.5.13 `(2021-02-12)`
11+
12+
- [x] Update dependencies: add support for [Microsoft.OpenApi.OData v1.0.6](https://www.nuget.org/packages/Microsoft.OpenApi.OData/1.0.6)
13+
- [x] [Fixed paths when Operation is bound to a type derived from the type of a nav prop.](https://github.com/microsoft/OpenAPI.NET.OData/pull/88)
14+
1015
## v1.5.12 `(2021-02-06)`
1116

1217
- [x] Update dependencies: add support for [NSwag.Commands v13.10.2](https://github.com/RicoSuter/NSwag/pull/3290)

src/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
// You can specify all the values or you can default the Build and Revision Numbers
3131
// by using the '*' as shown below:
3232
// [assembly: AssemblyVersion("1.2.*")]
33-
[assembly: AssemblyVersion("1.5.10")]
34-
[assembly: AssemblyFileVersion("1.5.10.0")]
33+
[assembly: AssemblyVersion("1.5.13")]
34+
[assembly: AssemblyFileVersion("1.5.13.0")]
3535
[assembly: NeutralResourcesLanguage("en-US")]
3636

src/Unchase.OpenAPI.ConnectedService.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -356,11 +356,11 @@
356356
<Reference Include="Microsoft.OData.Edm, Version=7.6.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
357357
<HintPath>packages\Microsoft.OData.Edm.7.6.1\lib\portable-net45+win8+wpa81\Microsoft.OData.Edm.dll</HintPath>
358358
</Reference>
359-
<Reference Include="Microsoft.OpenApi, Version=1.1.4.0, Culture=neutral, PublicKeyToken=3f5743946376f042, processorArchitecture=MSIL">
360-
<HintPath>packages\Microsoft.OpenApi.1.1.4\lib\net46\Microsoft.OpenApi.dll</HintPath>
359+
<Reference Include="Microsoft.OpenApi, Version=1.2.2.0, Culture=neutral, PublicKeyToken=3f5743946376f042, processorArchitecture=MSIL">
360+
<HintPath>packages\Microsoft.OpenApi.1.2.2\lib\net46\Microsoft.OpenApi.dll</HintPath>
361361
</Reference>
362-
<Reference Include="Microsoft.OpenApi.OData.Reader, Version=1.0.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
363-
<HintPath>packages\Microsoft.OpenApi.OData.1.0.4\lib\netstandard2.0\Microsoft.OpenApi.OData.Reader.dll</HintPath>
362+
<Reference Include="Microsoft.OpenApi.OData.Reader, Version=1.0.6.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
363+
<HintPath>packages\Microsoft.OpenApi.OData.1.0.6\lib\netstandard2.0\Microsoft.OpenApi.OData.Reader.dll</HintPath>
364364
</Reference>
365365
<Reference Include="Microsoft.VisualStudio.ComponentModelHost, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
366366
<HintPath>packages\Microsoft.VisualStudio.ComponentModelHost.15.8.525\lib\net46\Microsoft.VisualStudio.ComponentModelHost.dll</HintPath>

src/ViewModels/ConfigOpenApiEndpointViewModel.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,11 @@ public override async Task<PageNavigationResult> OnPageLeavingAsync(WizardLeavin
115115
{
116116
var csdl = File.ReadAllText(this.SpecificationTempPath);
117117
var model = CsdlReader.Parse(XElement.Parse(csdl).CreateReader());
118-
if (this.UserSettings.OpenApiConvertSettings.ServiceRoot == null && this.UserSettings.Endpoint.StartsWith("http", StringComparison.Ordinal))
118+
if ((this.UserSettings.OpenApiConvertSettings.ServiceRoot == null || this.UserSettings.OpenApiConvertSettings.ServiceRoot.Host.Contains("localhost"))
119+
&& this.UserSettings.Endpoint.StartsWith("http", StringComparison.Ordinal))
120+
{
119121
this.UserSettings.OpenApiConvertSettings.ServiceRoot = new Uri(this.UserSettings.Endpoint.TrimEnd("$metadata".ToCharArray()));
122+
}
120123
var document = model.ConvertToOpenApi(this.UserSettings.OpenApiConvertSettings);
121124
var outputJson = document.SerializeAsJson(this.UserSettings.OpenApiSpecVersion);
122125
File.WriteAllText(this.SpecificationTempPath, outputJson);

src/Views/ConfigOpenApiEndpoint.xaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,21 @@
346346
VerticalAlignment="Bottom"
347347
Content="Show schema examples."
348348
IsChecked="{Binding Path=UserSettings.OpenApiConvertSettings.ShowSchemaExamples, Mode=TwoWay}" />
349+
<CheckBox
350+
x:Name="OpenApiConvertSettingsRequireDerivedTypesConstraintForBoundOperations"
351+
Margin="20,5,10,5"
352+
HorizontalAlignment="Stretch"
353+
VerticalAlignment="Bottom"
354+
IsChecked="{Binding Path=UserSettings.OpenApiConvertSettings.RequireDerivedTypesConstraintForBoundOperations, Mode=TwoWay}">
355+
<TextBlock Text="Require the Validation.DerivedTypeConstraint to be applied to NavigationSources to bind operations of derived types to them." TextWrapping="Wrap" />
356+
</CheckBox>
357+
<CheckBox
358+
x:Name="OpenApiConvertSettingsShowRootPath"
359+
Margin="20,5,10,5"
360+
HorizontalAlignment="Stretch"
361+
VerticalAlignment="Bottom"
362+
Content="Show the root path of the described API."
363+
IsChecked="{Binding Path=UserSettings.OpenApiConvertSettings.ShowRootPath, Mode=TwoWay}" />
349364
</StackPanel>
350365
</StackPanel>
351366

src/app.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@
276276
</dependentAssembly>
277277
<dependentAssembly>
278278
<assemblyIdentity name="Microsoft.OpenApi" publicKeyToken="3f5743946376f042" culture="neutral" />
279-
<bindingRedirect oldVersion="0.0.0.0-1.2.2.0" newVersion="1.2.2.0" />
279+
<bindingRedirect oldVersion="0.0.0.0-1.2.3.0" newVersion="1.2.3.0" />
280280
</dependentAssembly>
281281
<dependentAssembly>
282282
<assemblyIdentity name="Microsoft.AspNetCore.Hosting.Abstractions" publicKeyToken="adb9793829ddae60" culture="neutral" />

src/packages.config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@
7373
<package id="Microsoft.Net.Http.Headers" version="2.2.0" targetFramework="net461" />
7474
<package id="Microsoft.NETCore.Platforms" version="3.0.0" targetFramework="net461" />
7575
<package id="Microsoft.OData.Edm" version="7.6.1" targetFramework="net461" />
76-
<package id="Microsoft.OpenApi" version="1.1.4" targetFramework="net461" />
77-
<package id="Microsoft.OpenApi.OData" version="1.0.4" targetFramework="net461" />
76+
<package id="Microsoft.OpenApi" version="1.2.2" targetFramework="net461" />
77+
<package id="Microsoft.OpenApi.OData" version="1.0.6" targetFramework="net461" />
7878
<package id="Microsoft.VisualStudio.ComponentModelHost" version="15.8.525" targetFramework="net461" />
7979
<package id="Microsoft.VisualStudio.ConnectedServices" version="15.3.47" targetFramework="net461" />
8080
<package id="Microsoft.VisualStudio.CoreUtility" version="15.6.27740" targetFramework="net472" />

src/source.extension.vsixmanifest

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<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">
33
<Metadata>
4-
<Identity Id="Unchase.Openapi.ConnectedService.63199638-6211-4285-ba8f-75b1f0326c2a" Version="1.5.10" Language="en-US" Publisher="Unchase" />
4+
<Identity Id="Unchase.Openapi.ConnectedService.63199638-6211-4285-ba8f-75b1f0326c2a" Version="1.5.13" Language="en-US" Publisher="Unchase" />
55
<DisplayName>Unchase OpenAPI (Swagger) Connected Service</DisplayName>
66
<Description xml:space="preserve">Connected service for Visual Studio to generate OpenAPI (Swagger) web service reference.</Description>
77
<MoreInfo>https://github.com/unchase/Unchase.OpenAPI.Connectedservice</MoreInfo>

0 commit comments

Comments
 (0)