Skip to content

Commit 85ba08c

Browse files
committed
Walker tests and loop detection
1 parent 6d7eca5 commit 85ba08c

File tree

3 files changed

+359
-54
lines changed

3 files changed

+359
-54
lines changed

src/Microsoft.OpenApi/Models/OpenApiHeader.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public class OpenApiHeader : IOpenApiSerializable, IOpenApiReferenceable, IOpenA
6969
/// <summary>
7070
/// Examples of the media type.
7171
/// </summary>
72-
public IList<OpenApiExample> Examples { get; set; } = new List<OpenApiExample>();
72+
public IDictionary<string, OpenApiExample> Examples { get; set; } = new Dictionary<string, OpenApiExample>();
7373

7474
/// <summary>
7575
/// A map containing the representations for the header.
@@ -135,7 +135,7 @@ public void SerializeAsV3WithoutReference(IOpenApiWriter writer)
135135
writer.WriteOptionalObject(OpenApiConstants.Example, Example, (w, s) => w.WriteAny(s));
136136

137137
// examples
138-
writer.WriteOptionalCollection(OpenApiConstants.Examples, Examples, (w, e) => e.SerializeAsV3(w));
138+
writer.WriteOptionalMap(OpenApiConstants.Examples, Examples, (w, e) => e.SerializeAsV3(w));
139139

140140
// content
141141
writer.WriteOptionalMap(OpenApiConstants.Content, Content, (w, c) => c.SerializeAsV3(w));

0 commit comments

Comments
 (0)