Skip to content

Commit 964b751

Browse files
committed
Write out examples
1 parent 807890c commit 964b751

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/Microsoft.OpenApi.Readers/V31/JsonSchemaDeserializer.cs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -236,15 +236,14 @@ internal static partial class OpenApiV31Deserializer
236236
{
237237
"example", (o, n) =>
238238
{
239-
if(n is ListNode)
239+
o.Example(n.CreateAny().Node);
240+
}
241+
},
242+
{
243+
"examples", (o, n) =>
240244
{
241245
o.Examples(n.CreateSimpleList(s => (JsonNode)s.GetScalarValue()));
242246
}
243-
else
244-
{
245-
o.Example(n.CreateAny().Node);
246-
}
247-
}
248247
},
249248
{
250249
"deprecated", (o, n) =>

0 commit comments

Comments
 (0)