We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6ff3176 commit 9b4a0efCopy full SHA for 9b4a0ef
src/Microsoft.OpenApi.Readers/OpenApiYamlDocumentReader.cs
@@ -114,11 +114,15 @@ public async Task<ReadResult> ReadAsync(YamlDocument input)
114
// Validate the document
115
if (_settings.RuleSet != null && _settings.RuleSet.Rules.Count > 0)
116
{
117
- var errors = document.Validate(_settings.RuleSet);
118
- foreach (var item in errors)
+ var openApiErrors = document.Validate(_settings.RuleSet);
+ foreach (var item in openApiErrors.Where(e => e is OpenApiValidatorError))
119
120
diagnostic.Errors.Add(item);
121
}
122
+ foreach (var item in openApiErrors.Where(e => e is OpenApiValidatorWarning))
123
+ {
124
+ diagnostic.Warnings.Add(item);
125
+ }
126
127
128
return new ReadResult()
0 commit comments