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 4e0639f commit a06ab0cCopy full SHA for a06ab0c
src/Microsoft.OpenApi.Hidi/OpenApiService.cs
@@ -204,14 +204,7 @@ internal static void ValidateOpenApiDocument(string input)
204
205
private static OpenApiFormat GetOpenApiFormat(string input)
206
{
207
- if (!input.StartsWith("http") && Path.GetExtension(input) == ".json")
208
- {
209
- return OpenApiFormat.Json;
210
- }
211
- else
212
213
- return OpenApiFormat.Yaml;
214
+ return !input.StartsWith("http") && Path.GetExtension(input) == ".json" ? OpenApiFormat.Json : OpenApiFormat.Yaml;
215
}
216
217
0 commit comments