Skip to content

Commit

Permalink
Avoid warning about invalid OpenAPI version
Browse files Browse the repository at this point in the history
Do not emit warning about an invalid OpenAPI version in the `dotnet-getdocument` tool if no explicit value was passed to the tool via the `` argument.
Relates to dotnet#57044.
  • Loading branch information
martincostello committed Jul 31, 2024
1 parent 5e9ec8d commit 5e2df1b
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,10 @@ private string GetDocument(
}
else
{
_reporter.WriteWarning(Resources.FormatInvalidOpenApiVersion(_context.OpenApiVersion));
if (!string.IsNullOrWhiteSpace(_context.OpenApiVersion))
{
_reporter.WriteWarning(Resources.FormatInvalidOpenApiVersion(_context.OpenApiVersion));
}
arguments = [documentName, writer, OpenApiSpecVersion.OpenApi3_0];
}
}
Expand Down

0 comments on commit 5e2df1b

Please sign in to comment.