Description
In the recently released .NET 9, there's built in support for generating openapi documents. However, these documents have to be predefined by specifying services.AddOpenApi();
.
This means that all API document names have to be defined in advance before the IServiceProvider
is even built. This seems to totally "break" the flow of the Asp.Versioning.Mvc.ApiExplorer
package. If I am not wrong, it was Microsoft themselves who delegated the original Microsoft.AspNetCore.Mvc.Versioning
to the community which ended up turning into this aspnet-api-versioning
.
Since documents have to be known in advance now and this package was basically providing an IApiVersionDescriptionProvider
in runtime, does .NET 9's default OpenApi document generation render aspnet-api-versioning
obsolete? None of what Micorosft provided with .NET 9 seems to display proper versioning support at all, just some different ways to generate documents at build time. Is there a way to integrate this with .NET 9's default OpenApi support now or am I missing something here?