Skip to content

Commit bf00ec7

Browse files
Update src/Microsoft.OpenApi.Hidi/OpenApiService.cs
Co-authored-by: Irvine Sunday <[email protected]>
1 parent 4e0639f commit bf00ec7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Microsoft.OpenApi.Hidi/OpenApiService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ internal static void ValidateOpenApiDocument(string input)
204204

205205
private static OpenApiFormat GetOpenApiFormat(string input)
206206
{
207-
if (!input.StartsWith("http") && Path.GetExtension(input) == ".json")
207+
return !input.StartsWith("http") && Path.GetExtension(input) == ".json" ? OpenApiFormat.Json : OpenApiFormat.Yaml;
208208
{
209209
return OpenApiFormat.Json;
210210
}

0 commit comments

Comments
 (0)