Skip to content

Commit 806c067

Browse files
committed
Fixed merge errors
1 parent 24bb7f4 commit 806c067

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/Microsoft.OpenApi.Readers/OpenApiStreamReader.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,11 @@ private void ValidateDocument(OpenApiDiagnostic diagnostic, OpenApiDocument docu
153153
if (_settings.RuleSet != null && _settings.RuleSet.Rules.Count > 0)
154154
{
155155
var errors = document.Validate(_settings.RuleSet);
156-
diagnostic.Errors.Add(errors);
156+
foreach (var item in errors)
157+
{
158+
diagnostic.Errors.Add(item);
159+
}
157160
}
158-
return document;
159161
}
160162

161163
/// <summary>
@@ -196,7 +198,7 @@ public T ReadFragment<T>(Stream input, OpenApiSpecVersion version, out OpenApiDi
196198
}
197199
catch (OpenApiException ex)
198200
{
199-
diagnostic.Errors.Add(new OpenApiError(ex));
201+
diagnostic.Errors.Add(new OpenApiReaderError(ex));
200202
}
201203

202204
// Validate the element

0 commit comments

Comments
 (0)