Skip to content

Commit 765a8dd

Browse files
committed
feat!: adds support for OpenAPI 3.2.0
Signed-off-by: Vincent Biret <vibiret@microsoft.com>
1 parent 837c3b2 commit 765a8dd

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

src/Microsoft.OpenApi/Reader/V31/OpenApiSchemaDeserializer.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -197,10 +197,9 @@ internal static partial class OpenApiV31Deserializer
197197
{
198198
var list = n.CreateSimpleList((n2, p) => n2.GetScalarValue(), doc);
199199
JsonSchemaType combinedType = 0;
200-
foreach(var type in list.Where(static t => t is not null))
200+
foreach(var type in list.Where(static t => t is not null).Select(static t => t!.ToJsonSchemaType()))
201201
{
202-
var schemaType = type.ToJsonSchemaType();
203-
combinedType |= schemaType;
202+
combinedType |= type;
204203
}
205204
o.Type = combinedType;
206205
}

src/Microsoft.OpenApi/Reader/V32/OpenApiSchemaDeserializer.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -197,10 +197,9 @@ internal static partial class OpenApiV32Deserializer
197197
{
198198
var list = n.CreateSimpleList((n2, p) => n2.GetScalarValue(), doc);
199199
JsonSchemaType combinedType = 0;
200-
foreach(var type in list.Where(static t => t is not null))
200+
foreach(var type in list.Where(static t => t is not null).Select(static t => t!.ToJsonSchemaType()))
201201
{
202-
var schemaType = type.ToJsonSchemaType();
203-
combinedType |= schemaType;
202+
combinedType |= type;
204203
}
205204
o.Type = combinedType;
206205
}

0 commit comments

Comments
 (0)