Disable swagger. Fix IDS4 tests.

pull/1810/head
Halil İbrahim Kalkan 5 years ago
parent e6b1eda9f9
commit 23fa87e017

@ -151,7 +151,7 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore
grant.Property(x => x.SubjectId).HasMaxLength(PersistedGrantConsts.SubjectIdMaxLength);
grant.Property(x => x.ClientId).HasMaxLength(PersistedGrantConsts.ClientIdMaxLength).IsRequired();
grant.Property(x => x.CreationTime).IsRequired();
grant.Property(x => x.Data);
grant.Property(x => x.Data).IsRequired();
grant.HasKey(x => x.Key); //TODO: What about Id!!!

@ -54,7 +54,8 @@ namespace Volo.Abp.IdentityServer
Key = "PersistedGrantKey1",
SubjectId = "PersistedGrantSubjectId1",
ClientId = "PersistedGrantClientId1",
Type = "PersistedGrantType1"
Type = "PersistedGrantType1",
Data = ""
});
_persistentGrantRepository.Insert(new PersistedGrant(_guidGenerator.Create())
@ -62,7 +63,8 @@ namespace Volo.Abp.IdentityServer
Key = "PersistedGrantKey2",
SubjectId = "PersistedGrantSubjectId2",
ClientId = "c1",
Type = "c1type"
Type = "c1type",
Data = ""
});
_persistentGrantRepository.Insert(new PersistedGrant(_guidGenerator.Create())
@ -70,7 +72,8 @@ namespace Volo.Abp.IdentityServer
Key = "PersistedGrantKey3",
SubjectId = "PersistedGrantSubjectId3",
ClientId = "c1",
Type = "c1type"
Type = "c1type",
Data = ""
});
}

@ -22,6 +22,7 @@
<PackageReference Include="Serilog.Extensions.Logging" Version="2.0.4" />
<PackageReference Include="Serilog.Sinks.File" Version="4.0.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="3.1.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="3.0.0-preview9.19423.6" />
</ItemGroup>
<ItemGroup>

@ -16,6 +16,7 @@
<PackageReference Include="IdentityServer4.AccessTokenValidation" Version="3.0.0" />
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="3.0.0-preview9.19423.4" />
<PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="3.0.0-preview9.19423.4" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="3.0.0-preview9.19423.6" />
<ProjectReference Include="..\..\..\..\..\framework\src\Volo.Abp.AspNetCore.MultiTenancy\Volo.Abp.AspNetCore.MultiTenancy.csproj" />
<ProjectReference Include="..\..\..\..\..\framework\src\Volo.Abp.Autofac\Volo.Abp.Autofac.csproj" />
</ItemGroup>

@ -39,11 +39,13 @@ namespace MyCompanyName.MyProjectName
ConfigureConventionalControllers();
ConfigureAuthentication(context, configuration);
ConfigureSwagger(context);
ConfigureLocalization();
ConfigureVirtualFileSystem(context);
ConfigureRedis(context, configuration, hostingEnvironment);
ConfigureCors(context, configuration);
//Disabled swagger since it does not support ASP.NET Core 3.0 yet!
//ConfigureSwaggerServices(context);
}
private void ConfigureVirtualFileSystem(ServiceConfigurationContext context)
@ -81,7 +83,7 @@ namespace MyCompanyName.MyProjectName
});
}
private static void ConfigureSwagger(ServiceConfigurationContext context)
private static void ConfigureSwaggerServices(ServiceConfigurationContext context)
{
context.Services.AddSwaggerGen(
options =>
@ -148,6 +150,7 @@ namespace MyCompanyName.MyProjectName
{
var app = context.GetApplicationBuilder();
app.UseRouting();
app.UseCors(DefaultCorsPolicyName);
app.UseVirtualFiles();
@ -157,11 +160,15 @@ namespace MyCompanyName.MyProjectName
app.UseMultiTenancy();
}
app.UseAbpRequestLocalization();
/* Disabled swagger since it does not support ASP.NET Core 3.0 yet!
app.UseSwagger();
app.UseSwaggerUI(options =>
{
options.SwaggerEndpoint("/swagger/v1/swagger.json", "MyProjectName API");
});
*/
app.UseAuditing();
app.UseMvcWithDefaultRouteAndArea();
}

@ -14,6 +14,7 @@
<PackageReference Include="Serilog.Sinks.Async" Version="1.4.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="4.0.1" />
<PackageReference Include="IdentityServer4.AccessTokenValidation" Version="3.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="3.0.0-preview9.19423.6" />
<ProjectReference Include="..\..\..\..\..\framework\src\Volo.Abp.AspNetCore.MultiTenancy\Volo.Abp.AspNetCore.MultiTenancy.csproj" />
<ProjectReference Include="..\..\..\..\..\framework\src\Volo.Abp.Autofac\Volo.Abp.Autofac.csproj" />
<ProjectReference Include="..\..\..\..\..\framework\src\Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic\Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.csproj" />

@ -46,10 +46,12 @@ namespace MyCompanyName.MyProjectName
ConfigureUrls(configuration);
ConfigureConventionalControllers();
ConfigureAuthentication(context, configuration);
ConfigureSwagger(context);
ConfigureLocalization();
ConfigureVirtualFileSystem(context);
ConfigureCors(context, configuration);
//Disabled swagger since it does not support ASP.NET Core 3.0 yet!
//ConfigureSwaggerServices(context);
}
private void ConfigureUrls(IConfigurationRoot configuration)
@ -99,7 +101,7 @@ namespace MyCompanyName.MyProjectName
});
}
private static void ConfigureSwagger(ServiceConfigurationContext context)
private static void ConfigureSwaggerServices(ServiceConfigurationContext context)
{
context.Services.AddSwaggerGen(
options =>
@ -147,6 +149,7 @@ namespace MyCompanyName.MyProjectName
{
var app = context.GetApplicationBuilder();
app.UseRouting();
app.UseCors(DefaultCorsPolicyName);
app.UseVirtualFiles();
@ -160,11 +163,15 @@ namespace MyCompanyName.MyProjectName
app.UseIdentityServer();
app.UseAbpRequestLocalization();
/* Disabled swagger since it does not support ASP.NET Core 3.0 yet!
app.UseSwagger();
app.UseSwaggerUI(options =>
{
options.SwaggerEndpoint("/swagger/v1/swagger.json", "MyProjectName API");
});
*/
app.UseAuditing();
app.UseMvcWithDefaultRouteAndArea();
}

@ -36,6 +36,7 @@
<PackageReference Include="Serilog.Sinks.Async" Version="1.4.0" />
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="3.0.0-preview9.19423.4" />
<PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="3.0.0-preview9.19423.4" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="3.0.0-preview9.19423.6" />
</ItemGroup>
<ItemGroup>

@ -19,6 +19,7 @@
<PackageReference Include="Serilog.Sinks.File" Version="4.0.0" />
<PackageReference Include="Serilog.Sinks.Async" Version="1.4.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="4.0.1" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="3.0.0-preview9.19423.4" />
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="3.0.0-preview9.19423.4" />
<PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="3.0.0-preview9.19423.4" />
</ItemGroup>

@ -73,8 +73,10 @@ namespace MyCompanyName.MyProjectName.Web
ConfigureAutoMapper();
ConfigureVirtualFileSystem(hostingEnvironment);
ConfigureNavigationServices();
ConfigureSwaggerServices(context.Services);
ConfigureMultiTenancy();
//Disabled swagger since it does not support ASP.NET Core 3.0 yet!
//ConfigureSwaggerServices(context.Services);
}
private void ConfigureUrls(IConfigurationRoot configuration)
@ -209,6 +211,7 @@ namespace MyCompanyName.MyProjectName.Web
app.UseErrorPage();
}
app.UseRouting();
app.UseVirtualFiles();
app.UseAuthentication();
@ -219,11 +222,13 @@ namespace MyCompanyName.MyProjectName.Web
app.UseAbpRequestLocalization();
/* Disabled swagger since it does not support ASP.NET Core 3.0 yet!
app.UseSwagger();
app.UseSwaggerUI(options =>
{
options.SwaggerEndpoint("/swagger/v1/swagger.json", "MyProjectName API");
});
*/
app.UseAuditing();

@ -36,6 +36,7 @@
<PackageReference Include="Serilog.Sinks.Async" Version="1.4.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="4.0.1" />
<PackageReference Include="IdentityServer4.AccessTokenValidation" Version="3.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="3.0.0-preview9.19423.6" />
</ItemGroup>
<ItemGroup>

@ -72,7 +72,9 @@ namespace MyCompanyName.MyProjectName.Web
ConfigureLocalizationServices();
ConfigureNavigationServices();
ConfigureAutoApiControllers();
ConfigureSwaggerServices(context.Services);
//Disabled swagger since it does not support ASP.NET Core 3.0 yet!
//ConfigureSwaggerServices(context.Services);
}
private void ConfigureUrls(IConfigurationRoot configuration)
@ -188,6 +190,7 @@ namespace MyCompanyName.MyProjectName.Web
app.UseErrorPage();
}
app.UseRouting();
app.UseVirtualFiles();
app.UseAuthentication();
app.UseJwtTokenMiddleware();
@ -199,11 +202,15 @@ namespace MyCompanyName.MyProjectName.Web
app.UseIdentityServer();
app.UseAbpRequestLocalization();
/* Disabled swagger since it does not support ASP.NET Core 3.0 yet!
app.UseSwagger();
app.UseSwaggerUI(options =>
{
options.SwaggerEndpoint("/swagger/v1/swagger.json", "MyProjectName API");
});
*/
app.UseAuditing();
app.UseMvcWithDefaultRouteAndArea();
}

Loading…
Cancel
Save