Skip to content

Commit 194576e

Browse files
committed
Fix exception thrown when OpenSpecVersion is null
1 parent 7db6f8a commit 194576e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Microsoft.OpenApi.Hidi/OpenApiService.cs

Lines changed: 2 additions & 2 deletions
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;
@@ -113,7 +113,7 @@ CancellationToken cancellationToken
113113
}
114114

115115
openApiFormat = format ?? GetOpenApiFormat(openapi, logger);
116-
openApiVersion = version == null ? TryParseOpenApiSpecVersion(version) : result.OpenApiDiagnostic.SpecificationVersion;
116+
openApiVersion = version == null ? result.OpenApiDiagnostic.SpecificationVersion : TryParseOpenApiSpecVersion(version);
117117
}
118118

119119
Func<string, OperationType?, OpenApiOperation, bool> predicate;

0 commit comments

Comments
 (0)