Skip to content

Commit 085c1f1

Browse files
committed
Auto-register the YamlReader in Hidi
1 parent 77f45b0 commit 085c1f1

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/Microsoft.OpenApi.Hidi/OpenApiService.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) Microsoft Corporation. All rights reserved.
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
22
// Licensed under the MIT license.
33

44
using System;
@@ -40,6 +40,12 @@ namespace Microsoft.OpenApi.Hidi
4040
{
4141
internal static class OpenApiService
4242
{
43+
static OpenApiService()
44+
{
45+
OpenApiReaderRegistry.RegisterReader(OpenApiConstants.Yaml, new OpenApiYamlReader());
46+
OpenApiReaderRegistry.RegisterReader(OpenApiConstants.Yml, new OpenApiYamlReader());
47+
}
48+
4349
/// <summary>
4450
/// Implementation of the transform command
4551
/// </summary>

0 commit comments

Comments
 (0)