Bemærk
Adgang til denne side kræver godkendelse. Du kan prøve at logge på eller ændre mapper.
Adgang til denne side kræver godkendelse. Du kan prøve at ændre mapper.
The default value of OpenApiVersion has changed from OpenApiSpecVersion.OpenApi3_1 to OpenApiSpecVersion.OpenApi3_2. Apps that depend on OpenAPI 3.1 output without explicitly setting the version now produce OpenAPI 3.2 documents.
Version introduced
.NET 11 Preview 6
Previous behavior
Previously, OpenApiOptions.OpenApiVersion defaulted to OpenApiSpecVersion.OpenApi3_1. Calling AddOpenApi without explicitly setting a version produced an OpenAPI 3.1 document.
New behavior
Starting in ASP.NET Core 11 Preview 6, OpenApiOptions.OpenApiVersion defaults to OpenApiSpecVersion.OpenApi3_2. Calling AddOpenApi without explicitly setting a version now produces an OpenAPI 3.2 document.
Type of breaking change
This change is a behavioral change.
Reason for change
ASP.NET Core's OpenAPI support uses the latest released version of the OpenAPI specification as the default so that apps benefit from new capabilities without additional configuration.
Recommended action
In most cases, no action is needed. To support downstream tooling that doesn't yet handle OpenAPI 3.2, configure the version explicitly:
builder.Services.AddOpenApi(options =>
{
options.OpenApiVersion = Microsoft.OpenApi.OpenApiSpecVersion.OpenApi3_1;
});
Affected APIs
ASP.NET Core