Skip to content

Commit 0fdfae1

Browse files
committed
fix: missing deserialization for header content property in 3.1 and 3.0
1 parent a443663 commit 0fdfae1

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

src/Microsoft.OpenApi/Reader/V3/OpenApiHeaderDeserializer.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,12 @@ internal static partial class OpenApiV3Deserializer
8787
"schema",
8888
(o, n, t) => o.Schema = LoadSchema(n, t)
8989
},
90+
{
91+
"content", (o, n, t) =>
92+
{
93+
o.Content = n.CreateMap(LoadMediaType, t);
94+
}
95+
},
9096
{
9197
"examples",
9298
(o, n, t) => o.Examples = n.CreateMap(LoadExample, t)

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,12 @@ internal static partial class OpenApiV31Deserializer
8787
o.Schema = LoadSchema(n, t);
8888
}
8989
},
90+
{
91+
"content", (o, n, t) =>
92+
{
93+
o.Content = n.CreateMap(LoadMediaType, t);
94+
}
95+
},
9096
{
9197
"examples", (o, n, t) =>
9298
{

0 commit comments

Comments
 (0)