Skip to content

Commit

Permalink
Merge pull request #226
Browse files Browse the repository at this point in the history
Migrate to .NET 6
  • Loading branch information
Burgyn authored Mar 25, 2022
2 parents 5cb1dc5 + 47c23d4 commit 761d04d
Show file tree
Hide file tree
Showing 15 changed files with 38 additions and 42 deletions.
8 changes: 4 additions & 4 deletions demo/ApiGateway/ApiGateway.csproj
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="3.1.2" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="6.0.2" />
<PackageReference Include="MMLib.Ocelot.Provider.AppConfiguration" Version="2.0.0" />
<PackageReference Include="Ocelot" Version="17.0.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="5.6.3" />
<PackageReference Include="Ocelot" Version="18.0.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.3.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>ApiGatewayWithEndpointSecurity</RootNamespace>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Ocelot" Version="17.0.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="5.6.3" />
<PackageReference Include="Ocelot" Version="18.0.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.3.0" />
</ItemGroup>

<ItemGroup>
Expand Down
3 changes: 1 addition & 2 deletions demo/ApiGatewayWithEndpointInterceptor/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using ApiGatewayWithEndpointSecurity.Repository;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Ocelot.DependencyInjection;
Expand All @@ -29,7 +28,7 @@ public void ConfigureServices(IServiceCollection services)
services.AddSingleton<ISwaggerDownstreamInterceptor, PublishedDownstreamInterceptor>();
services.AddSingleton<ISwaggerEndpointConfigurationRepository, DummySwaggerEndpointRepository>();

services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_3_0);
services.AddMvc();
}

public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
Expand Down
6 changes: 3 additions & 3 deletions demo/ApiGatewayWithPath/ApiGatewayWithPath.csproj
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Ocelot" Version="17.0.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="5.6.3" />
<PackageReference Include="Ocelot" Version="18.0.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.3.0" />
</ItemGroup>

<ItemGroup>
Expand Down
3 changes: 1 addition & 2 deletions demo/ApiGatewayWithPath/Startup.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Ocelot.DependencyInjection;
Expand All @@ -24,7 +23,7 @@ public void ConfigureServices(IServiceCollection services)
services.AddOcelot();
services.AddSwaggerForOcelot(Configuration);

services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_3_0);
services.AddMvc();
}

public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
Expand Down
2 changes: 1 addition & 1 deletion demo/ApiGatewayWithPath/ocelot.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
{
"Name": "Contacts API",
"Version": "v1",
"Url": "http://localhost:5000/swagger/v1/swagger.json"
"Url": "http://localhost:5100/swagger/v1/swagger.json"
}
]
},
Expand Down
4 changes: 2 additions & 2 deletions demo/ContactService/ContactService.csproj
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Swashbuckle.AspNetCore" Version="5.6.3" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.3.0" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion demo/ContactService/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public Startup(IConfiguration configuration)
// This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServiceCollection services)
{
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_3_0);
services.AddMvc();
services.AddSwaggerGen(c =>
{
c.SwaggerDoc("v1", new OpenApiInfo() { Title = "Contacts API", Version = "v1" });
Expand Down
6 changes: 3 additions & 3 deletions demo/OrderService/OrderService.csproj
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel>
<RootNamespace>OrderService</RootNamespace>
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\$(MSBuildThisFileName).xml</DocumentationFile>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Mvc.Versioning.ApiExplorer" Version="4.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Versioning.ApiExplorer" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.PlatformAbstractions" Version="1.1.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="5.6.3" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.3.0" />
</ItemGroup>


Expand Down
3 changes: 1 addition & 2 deletions demo/OrderService/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
using Swashbuckle.AspNetCore.SwaggerGen;
using System.IO;
using System.Reflection;
using static Microsoft.AspNetCore.Mvc.CompatibilityVersion;

namespace OrderService
{
Expand Down Expand Up @@ -40,7 +39,7 @@ public void ConfigureServices(IServiceCollection services)
{
// the sample application always uses the latest version, but you may want an explicit version such as Version_2_2
// note: Endpoint Routing is enabled by default; however, if you need legacy style routing via IRouter, change it to false
services.AddMvc(options => options.EnableEndpointRouting = true).SetCompatibilityVersion(Latest);
services.AddMvc(options => options.EnableEndpointRouting = true);
services.AddApiVersioning(
options =>
{
Expand Down
2 changes: 1 addition & 1 deletion demo/PetstoreService/PetstoreService.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions demo/ProjectService/ProjectService.csproj
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="MMLib.RapidPrototyping" Version="1.3.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="5.6.3" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.3.0" />
</ItemGroup>

</Project>
3 changes: 1 addition & 2 deletions demo/ProjectService/Startup.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.OpenApi.Models;
Expand All @@ -20,7 +19,7 @@ public Startup(IConfiguration configuration)
// This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServiceCollection services)
{
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_3_0);
services.AddMvc();
services.AddSwaggerGen(c =>
{
c.SwaggerDoc("v1", new OpenApiInfo()
Expand Down
14 changes: 7 additions & 7 deletions src/MMLib.SwaggerForOcelot/MMLib.SwaggerForOcelot.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<Version>4.9.0</Version>
<TargetFramework>net6.0</TargetFramework>
<Version>5.0.0</Version>
<Authors>Milan Martiniak</Authors>
<Company>MMLib</Company>
<Description>Swagger generator for Ocelot downstream services.</Description>
Expand All @@ -27,11 +27,11 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Kros.Utils" Version="1.10.1" />
<PackageReference Include="Microsoft.Extensions.Http" Version="5.0.0" />
<PackageReference Include="Ocelot" Version="17.0.0" />
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerGen" Version="6.2.3" />
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerUI" Version="6.2.3" />
<PackageReference Include="Kros.Utils" Version="1.19.0" />
<PackageReference Include="Microsoft.Extensions.Http" Version="6.0.0" />
<PackageReference Include="Ocelot" Version="18.0.0" />
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerGen" Version="6.3.0" />
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerUI" Version="6.3.0" />
</ItemGroup>
<ItemGroup>
<None Include="../../README.md" Pack="true" PackagePath="\" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,14 @@
<EmbeddedResource Include="Tests\OpenApiWithHostOverriddenWhenUpstreamAndDownstreamPathsAreDifferent.json" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="FluentAssertions" Version="5.9.0" />
<PackageReference Include="JsonDiffPatch.Net" Version="2.1.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.4.0" />
<PackageReference Include="Moq" Version="4.13.1" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="NSubstitute" Version="4.2.1" />
<PackageReference Include="FluentAssertions" Version="6.5.1" />
<PackageReference Include="JsonDiffPatch.Net" Version="2.3.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.1.0" />
<PackageReference Include="Moq" Version="4.17.2" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="NSubstitute" Version="4.3.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1">
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
Expand Down

0 comments on commit 761d04d

Please sign in to comment.