Skip to content

[Breaking change]: OpenApiVersion default change from OpenApiSpecVersion.OpenApi3_1 to OpenApiSpecVersion.OpenApi3_2 #530

Description

@Youssef1313

Description

The default OpenApi spec version is changing to 3.2 instead of 3.1.

Version

.NET 11 Preview 6

Previous behavior

OpenApiOptions.OpenApiVersion defaulted to OpenApiSpecVersion.OpenApi3_1

New behavior

OpenApiOptions.OpenApiVersion defaults to OpenApiSpecVersion.OpenApi3_2

Type of breaking change

  • Binary incompatible: Existing binaries may encounter a breaking change in behavior, such as failure to load or execute, and if so, require recompilation.
  • Source incompatible: When recompiled using the new SDK or component or to target the new runtime, existing source code may require source changes to compile successfully.
  • Behavioral change: Existing binaries may behave differently at run time.

Reason for change

We aim to always use the latest version of the spec by default.

Recommended action

Generally, no action is needed except if users encounter problems, like other toolings that don't support OpenApi 3.2.

If you're impacted, you can always configure the OpenApiOptions to use 3.1:

builder.Services.AddOpenApi(options =>
{
    options.OpenApiVersion = OpenApiSpecVersion.OpenApi3_1;
});

Affected APIs

  • OpenApiOptions.OpenApiVersion

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions