Skip to content

Commit b398542

Browse files
authored
Merge pull request #2578 from microsoft/feat/oai3-2-0-release
feat!: adds support for OpenAPI 3.2.0
2 parents 837c3b2 + 765a8dd commit b398542

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)