We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b1b2fc5 commit b6d68bbCopy full SHA for b6d68bb
src/Microsoft.OpenApi/Models/OpenApiResponse.cs
@@ -135,8 +135,9 @@ public void SerializeAsV2(IOpenApiWriter writer)
135
writer.WriteStartObject();
136
137
foreach (var example in Content
138
- .Where(mediaTypePair => mediaTypePair.Value.Examples is not null && mediaTypePair.Value.Examples.Any())
139
- .SelectMany(mediaTypePair => mediaTypePair.Value.Examples!))
+ .Select(static x => x.Value.Examples)
+ .OfType<IDictionary<string, IOpenApiExample>>()
140
+ .SelectMany(static x => x))
141
{
142
writer.WritePropertyName(example.Key);
143
example.Value.SerializeAsV2(writer);
0 commit comments