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 1338905 commit 03edbc9Copy full SHA for 03edbc9
src/Microsoft.OpenApi/Reader/ParsingContext.cs
@@ -271,9 +271,9 @@ public void PopLoop(string loopid)
271
272
private void ValidateRequiredFields(OpenApiDocument doc, string version)
273
{
274
- if ((version.is2_0() || version.is3_0()) && (doc.Paths == null || !doc.Paths.Any()))
+ if ((version.is2_0() || version.is3_0()) && (doc.Paths == null))
275
276
- // paths is a required field in OpenAPI 3.0 but optional in 3.1
+ // paths is a required field in OpenAPI 2.0 and 3.0 but optional in 3.1
277
RootNode.Context.Diagnostic.Errors.Add(new OpenApiError("", $"Paths is a REQUIRED field at {RootNode.Context.GetLocation()}"));
278
}
279
0 commit comments