Skip to content

Commit 480310e

Browse files
committed
Set the JsonReader as the default reader and use it in the YamlReader to reuse the ReadAsync() methods
1 parent 18a152e commit 480310e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Microsoft.OpenApi/Reader/OpenApiReaderRegistry.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ public static class OpenApiReaderRegistry
1414
{
1515
private static readonly Dictionary<string, IOpenApiReader> _readers = new(StringComparer.OrdinalIgnoreCase);
1616

17+
/// <summary>
18+
/// Defines a default OpenAPI reader.
19+
/// </summary>
20+
public static readonly IOpenApiReader DefaultReader = new OpenApiJsonReader();
21+
1722
/// <summary>
1823
/// Registers an IOpenApiReader for a given OpenAPI format.
1924
/// </summary>

0 commit comments

Comments
 (0)