net11.0
namespace Microsoft.AspNetCore.Builder
{
    public static class OpenApiEndpointConventionBuilderExtensions
    {
        [Obsolete("WithOpenApi is deprecated and will be removed in a future release. For more information, visit https://aka.ms/aspnet/deprecate/002.", DiagnosticId = "ASPDEPR002", UrlFormat = "https://aka.ms/aspnet/deprecate/002")]
        [RequiresDynamicCode("Calls Microsoft.AspNetCore.OpenApi.OpenApiGenerator.GetOpenApiOperation(MethodInfo, EndpointMetadataCollection, RoutePattern) which uses dynamic analysis. Use IServiceCollection.AddOpenApi() to generate OpenAPI metadata at startup for all endpoints,")]
        [RequiresUnreferencedCode("Calls Microsoft.AspNetCore.OpenApi.OpenApiGenerator.GetOpenApiOperation(MethodInfo, EndpointMetadataCollection, RoutePattern) which uses dynamic analysis. Use IServiceCollection.AddOpenApi() to generate OpenAPI metadata at startup for all endpoints,")]
        public static TBuilder WithOpenApi<TBuilder>(this TBuilder builder)
            where TBuilder, IEndpointConventionBuilder!;
    }
}
nuget.org
0.0 %
Reference this API
.NET
10.011.0
Information specific to net11.0
Assemblies

Microsoft.AspNetCore.OpenApi , Version=11.0.0.0, PublicKeyToken=adb9793829ddae60

Microsoft.AspNetCore.OpenApi , Version=10.0.5.0, PublicKeyToken=adb9793829ddae60

Referencing

Your project needs a package reference to Microsoft.AspNetCore.OpenApi.

Package Microsoft.AspNetCore.OpenApi (11.0.0-preview.2.26159.112) net11.0
Obsolete ASPDEPR002: WithOpenApi is deprecated and will be removed in a future release. For more information, visit https://aka.ms/aspnet/deprecate/002.
Platform Restrictions

This API is supported on all platforms.

  • Built-in API
  • Package-provided API