Skip to content

Commit daaa47c

Browse files
committed
- fixes a bug where the protocol definition would fail on linux OS
1 parent ac55390 commit daaa47c

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/Microsoft.OpenApi.Hidi/Microsoft.OpenApi.Hidi.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<PackageId>Microsoft.OpenApi.Hidi</PackageId>
1616
<ToolCommandName>hidi</ToolCommandName>
1717
<PackageOutputPath>./../../artifacts</PackageOutputPath>
18-
<Version>1.2.1</Version>
18+
<Version>1.2.2</Version>
1919
<Description>OpenAPI.NET CLI tool for slicing OpenAPI documents</Description>
2020
<Copyright>© Microsoft Corporation. All rights reserved.</Copyright>
2121
<PackageTags>OpenAPI .NET</PackageTags>

src/Microsoft.OpenApi.Hidi/OpenApiService.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,9 +285,10 @@ private static async Task<ReadResult> ParseOpenApi(string openApiFile, bool inli
285285

286286
result = await new OpenApiStreamReader(new OpenApiReaderSettings
287287
{
288-
RuleSet = ValidationRuleSet.GetDefaultRuleSet(),
289288
LoadExternalRefs = inlineExternal,
290-
BaseUrl = openApiFile.StartsWith("http") ? new Uri(openApiFile) : new Uri("file:" + new FileInfo(openApiFile).DirectoryName + Path.DirectorySeparatorChar)
289+
BaseUrl = openApiFile.StartsWith("http", StringComparison.OrdinalIgnoreCase) ?
290+
new Uri(openApiFile) :
291+
new Uri("file://" + new FileInfo(openApiFile).DirectoryName + Path.DirectorySeparatorChar)
291292
}
292293
).ReadAsync(stream);
293294

0 commit comments

Comments
 (0)