You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: aspnetcore/release-notes/aspnetcore-10/includes/openApi.md
+26-2Lines changed: 26 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ Some of the changes you will see in the generated OpenAPI document include:
12
12
- Nullable types no longer have the `nullable: true` property in the schema.
13
13
- Instead of a `nullable: true` property, they have a `type` keyword whose value is an array that includes `null` as one of the types.
14
14
15
-
With this feature, the default OpenAPI version for generated documents is`3.1`. The version can be changed by explicitly setting the [OpenApiVersion](/dotnet/api/microsoft.aspnetcore.openapi.openapioptions.openapiversion) property of the [OpenApiOptions](/dotnet/api/microsoft.aspnetcore.openapi.openapioptions) in the `configureOptions` delegate parameter of [AddOpenApi](/dotnet/api/microsoft.extensions.dependencyinjection.openapiservicecollectionextensions.addopenapi).
15
+
With this feature, the default OpenAPI version for generated documents is`3.1`. The version can be changed by explicitly setting the [OpenApiVersion](/dotnet/api/microsoft.aspnetcore.openapi.openapioptions.openapiversion) property of the [OpenApiOptions](/dotnet/api/microsoft.aspnetcore.openapi.openapioptions) in the `configureOptions` delegate parameter of [AddOpenApi](/dotnet/api/microsoft.extensions.dependencyinjection.openapiservicecollectionextensions.addopenapi).
16
16
17
17
```csharp
18
18
builder.Services.AddOpenApi(options=>
@@ -35,7 +35,7 @@ OpenAPI 3.1 support was primarly added in the following [PR](https://github.com/
35
35
36
36
Support for OpenAPI 3.1 requires an update to the underlying OpenAPI.NET library to a new major version, 2.0. This new version has some breaking changes from the previous version. The breaking changes may impact apps if they have any document, operation, or schema transformers.
37
37
38
-
One of the most significant changes is that the `OpenApiAny` class has been dropped in favor of using `JsonNode` directly.If your transformers use `OpenApiAny`, you will need to update them to use `JsonNode` instead. For example, a schema transformer to add an example in .NET 9 might look like the following:
38
+
One of the most significant changes is that the `OpenApiAny` class has been dropped in favor of using `JsonNode` directly. Transformers that use `OpenApiAny`need to be updated to use `JsonNode`. For example, a schema transformer to add an example in .NET 9 might look like the following:
0 commit comments