Skip to content

Revert "Added endpoint API explorer to default webhost (#33800)" #34257

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions src/DefaultBuilder/DefaultBuilder.slnf
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,8 @@
"src\\Http\\Http.Features\\src\\Microsoft.AspNetCore.Http.Features.csproj",
"src\\Http\\Http\\src\\Microsoft.AspNetCore.Http.csproj",
"src\\Http\\WebUtilities\\src\\Microsoft.AspNetCore.WebUtilities.csproj",
"src\\Middleware\\ResponseCaching.Abstractions\\src\\Microsoft.AspNetCore.ResponseCaching.Abstractions.csproj",
"src\\Middleware\\StaticFiles\\src\\Microsoft.AspNetCore.StaticFiles.csproj",
"src\\Mvc\\Mvc.Abstractions\\src\\Microsoft.AspNetCore.Mvc.Abstractions.csproj",
"src\\Mvc\\Mvc.ApiExplorer\\src\\Microsoft.AspNetCore.Mvc.ApiExplorer.csproj",
"src\\Mvc\\Mvc.Core\\src\\Microsoft.AspNetCore.Mvc.Core.csproj",
"src\\ObjectPool\\src\\Microsoft.Extensions.ObjectPool.csproj",
"src\\Security\\Authentication\\Core\\src\\Microsoft.AspNetCore.Authentication.csproj",
"src\\Security\\Authorization\\Policy\\src\\Microsoft.AspNetCore.Authorization.Policy.csproj"
"src\\ObjectPool\\src\\Microsoft.Extensions.ObjectPool.csproj"
]
}
}
1 change: 0 additions & 1 deletion src/DefaultBuilder/src/Microsoft.AspNetCore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
<Reference Include="Microsoft.AspNetCore.Server.IIS" />
<Reference Include="Microsoft.AspNetCore.Server.IISIntegration" />
<Reference Include="Microsoft.AspNetCore.Server.Kestrel" />
<Reference Include="Microsoft.AspNetCore.Mvc.ApiExplorer" />
<Reference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" />
<Reference Include="Microsoft.Extensions.Configuration.FileExtensions" />
<Reference Include="Microsoft.Extensions.Configuration.Json" />
Expand Down
1 change: 0 additions & 1 deletion src/DefaultBuilder/src/WebHost.cs
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,6 @@ internal static void ConfigureWebDefaults(IWebHostBuilder builder)
}

services.AddRouting();
services.AddEndpointsApiExplorer();
})
.UseIIS()
.UseIISIntegration();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
using Microsoft.AspNetCore.Hosting.Server;
using Microsoft.AspNetCore.Hosting.Server.Features;
using Microsoft.AspNetCore.Http.Features;
using Microsoft.AspNetCore.Mvc.ApiExplorer;
using Microsoft.AspNetCore.Routing;
using Microsoft.AspNetCore.TestHost;
using Microsoft.AspNetCore.Testing;
Expand Down Expand Up @@ -270,14 +269,6 @@ public void WebApplicationCreate_RegistersRouting()
Assert.NotNull(linkGenerator);
}

[Fact]
public void WebApplicationCreate_RegistersApiExplorerForEndpoints()
{
var app = WebApplication.Create();
var apiDescriptionProvider = app.Services.GetService(typeof(IApiDescriptionProvider));
Assert.NotNull(apiDescriptionProvider);
}

[Fact]
public void WebApplicationCreate_RegistersEventSourceLogger()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.HostFiltering;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Mvc.ApiExplorer;
using Microsoft.AspNetCore.Routing;
using Microsoft.AspNetCore.TestHost;
using Microsoft.AspNetCore.Testing;
Expand Down Expand Up @@ -100,17 +99,6 @@ public void CreateDefaultBuilder_RegistersRouting()
Assert.NotNull(linkGenerator);
}

[Fact]
public void CreateDefaultBuilder_RegistersApiExplorer()
{
var host = WebHost.CreateDefaultBuilder()
.Configure(_ => { })
.Build();

var apiDescriptionProvider = host.Services.GetService(typeof(IApiDescriptionProvider));
Assert.NotNull(apiDescriptionProvider);
}

[Fact]
public void CreateDefaultBuilder_RegistersEventSourceLogger()
{
Expand Down