Skip to content

Commit 9037ca4

Browse files
Merge pull request #1481 from microsoft/mk/fix-hidi-relative-path
Configure Hidi --settings-file path to be relative to the current working directory
2 parents d06a89d + 85dafb5 commit 9037ca4

File tree

4 files changed

+11
-6
lines changed

4 files changed

+11
-6
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<Nullable>enable</Nullable>
1010
<ToolCommandName>hidi</ToolCommandName>
1111
<PackageOutputPath>./../../artifacts</PackageOutputPath>
12-
<Version>1.3.5</Version>
12+
<Version>1.3.6</Version>
1313
<Description>OpenAPI.NET CLI tool for slicing OpenAPI documents</Description>
1414
<SignAssembly>true</SignAssembly>
1515
<!-- https://github.com/dotnet/sourcelink/blob/main/docs/README.md#embeduntrackedsources -->

src/Microsoft.OpenApi.Hidi/Utilities/SettingsUtilities.cs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Copyright (c) Microsoft Corporation. All rights reserved.
22
// Licensed under the MIT license.
33

4+
using System.IO;
45
using Microsoft.Extensions.Configuration;
56
using Microsoft.OpenApi.OData;
67

@@ -11,15 +12,19 @@ internal static class SettingsUtilities
1112
internal static IConfiguration GetConfiguration(string? settingsFile = null)
1213
{
1314
if (string.IsNullOrEmpty(settingsFile))
15+
{
1416
settingsFile = "appsettings.json";
17+
}
18+
19+
var settingsFilePath = Path.Combine(Directory.GetCurrentDirectory(), settingsFile);
1520

1621
IConfiguration config = new ConfigurationBuilder()
17-
.AddJsonFile(settingsFile, true)
18-
.Build();
22+
.AddJsonFile(settingsFilePath, true)
23+
.Build();
1924

2025
return config;
2126
}
22-
27+
2328
internal static OpenApiConvertSettings GetOpenApiConvertSettings(IConfiguration config, string? metadataVersion)
2429
{
2530
if (config == null) { throw new System.ArgumentNullException(nameof(config)); }

src/Microsoft.OpenApi.Readers/Microsoft.OpenApi.Readers.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<TargetFramework>netstandard2.0</TargetFramework>
44
<LangVersion>latest</LangVersion>
55
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
6-
<Version>1.6.10</Version>
6+
<Version>1.6.11</Version>
77
<Description>OpenAPI.NET Readers for JSON and YAML documents</Description>
88
<SignAssembly>true</SignAssembly>
99
<!-- https://github.com/dotnet/sourcelink/blob/main/docs/README.md#embeduntrackedsources -->

src/Microsoft.OpenApi/Microsoft.OpenApi.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<TargetFramework>netstandard2.0</TargetFramework>
44
<LangVersion>Latest</LangVersion>
55
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
6-
<Version>1.6.10</Version>
6+
<Version>1.6.11</Version>
77
<Description>.NET models with JSON and YAML writers for OpenAPI specification</Description>
88
<SignAssembly>true</SignAssembly>
99
<!-- https://github.com/dotnet/sourcelink/blob/main/docs/README.md#embeduntrackedsources -->

0 commit comments

Comments
 (0)