Skip to content

Commit cb394dc

Browse files
committed
Register the Yaml reader with our factory's registry for parsing of YAML docs
1 parent c3373af commit cb394dc

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Microsoft.OpenApi.Workbench/MainModel.cs

Lines changed: 4 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;
@@ -203,6 +203,9 @@ protected void OnPropertyChanged(string propertyName)
203203
/// </summary>
204204
internal async Task ParseDocumentAsync()
205205
{
206+
OpenApiReaderRegistry.RegisterReader(OpenApiConstants.Yaml, new OpenApiYamlReader());
207+
OpenApiReaderRegistry.RegisterReader(OpenApiConstants.Yml, new OpenApiYamlReader());
208+
206209
Stream stream = null;
207210
try
208211
{

0 commit comments

Comments
 (0)