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: docs/upgrade-guide-2.md
+8-21Lines changed: 8 additions & 21 deletions
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ ms.topic: conceptual
8
8
9
9
# Introduction
10
10
11
-
We are excited to announce the preview of a new version of the OpenAPI.NET library!
11
+
We are excited to announce the new version of the OpenAPI.NET library!
12
12
OpenAPI.NET v2 is a major update to the OpenAPI.NET library. This release includes a number of performance improvements, API enhancements, and support for OpenAPI v3.1.
13
13
14
14
## The biggest update ever
@@ -86,11 +86,11 @@ var mySchema = new OpenApiSchema();
@@ -251,7 +251,7 @@ parameter.Extensions.Add("x-foo", new JsonNodeExtension(openApiObject));
251
251
252
252
### Enable Null Reference Type Support
253
253
254
-
Version 2.0 preview 13 introduces support for null reference types, which improves type safety and reduces the likelihood of null reference exceptions.
254
+
Version 2.0 introduces support for null reference types, which improves type safety and reduces the likelihood of null reference exceptions.
255
255
256
256
**Example:**
257
257
@@ -266,19 +266,6 @@ var document = new OpenApiDocument
266
266
varcomponentA=document.Components["A"];
267
267
```
268
268
269
-
### Collections are implementations
270
-
271
-
Any collection used by the model now documents using the implementation type instead of the interface. This facilitates the usage of new language features such as collections initialization.
272
-
273
-
```csharp
274
-
varschema=newOpenApiSchema();
275
-
276
-
// 1.X: does not compile due to the lack of implementation type
277
-
// 2.X: compiles successfully
278
-
schema.AnyOf= [];
279
-
// now a List<OpenApiSchema> instead of IList<OpenApiSchema>
280
-
```
281
-
282
269
### Ephemeral object properties are now in Metadata
283
270
284
271
In version 1.X applications could add ephemeral properties to some of the models from the libraries. These properties would be carried along in an "Annotations" property, but not serialized. This is especially helpful when building integrations that build document in multiple phases and need additional context to complete the work. The property is now named metadata to avoid any confusion with other terms. The parent interface has also been renamed from `IOpenApiAnnotatable` to `IMetadataContainer`.
@@ -432,7 +419,7 @@ public class OpenApiComponents : IOpenApiSerializable, IOpenApiExtensible
432
419
/// <summary>
433
420
/// An object to hold reusable <seecref="OpenApiPathItem"/> Object.
@@ -441,7 +428,7 @@ public class OpenApiComponents : IOpenApiSerializable, IOpenApiExtensible
441
428
Through the use of proxy objects in order to represent references, it is now possible to set the Summary and Description property on an object that is a reference. This was previously not possible.
0 commit comments