From 47ef7754479275495973fac82552b2f83a6502cf Mon Sep 17 00:00:00 2001 From: Maggiekimani1 Date: Wed, 22 Nov 2023 19:43:33 +0300 Subject: [PATCH 1/2] Configure the settings file path to be relative to the current working directory --- .../Utilities/SettingsUtilities.cs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/Microsoft.OpenApi.Hidi/Utilities/SettingsUtilities.cs b/src/Microsoft.OpenApi.Hidi/Utilities/SettingsUtilities.cs index 6ec32f488..f6798287a 100644 --- a/src/Microsoft.OpenApi.Hidi/Utilities/SettingsUtilities.cs +++ b/src/Microsoft.OpenApi.Hidi/Utilities/SettingsUtilities.cs @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. +using System.IO; using Microsoft.Extensions.Configuration; using Microsoft.OpenApi.OData; @@ -11,15 +12,19 @@ internal static class SettingsUtilities internal static IConfiguration GetConfiguration(string? settingsFile = null) { if (string.IsNullOrEmpty(settingsFile)) + { settingsFile = "appsettings.json"; + } + + var settingsFilePath = Path.Combine(Directory.GetCurrentDirectory(), settingsFile); IConfiguration config = new ConfigurationBuilder() - .AddJsonFile(settingsFile, true) - .Build(); + .AddJsonFile(settingsFilePath, true) + .Build(); return config; } - + internal static OpenApiConvertSettings GetOpenApiConvertSettings(IConfiguration config, string? metadataVersion) { if (config == null) { throw new System.ArgumentNullException(nameof(config)); } From 85dafb55abf6164d06efb24352a6297edcefd52b Mon Sep 17 00:00:00 2001 From: Maggiekimani1 Date: Wed, 22 Nov 2023 19:53:03 +0300 Subject: [PATCH 2/2] Upgrade lib versions --- src/Microsoft.OpenApi.Hidi/Microsoft.OpenApi.Hidi.csproj | 2 +- src/Microsoft.OpenApi.Readers/Microsoft.OpenApi.Readers.csproj | 2 +- src/Microsoft.OpenApi/Microsoft.OpenApi.csproj | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Microsoft.OpenApi.Hidi/Microsoft.OpenApi.Hidi.csproj b/src/Microsoft.OpenApi.Hidi/Microsoft.OpenApi.Hidi.csproj index 620043d64..c5f3e09d0 100644 --- a/src/Microsoft.OpenApi.Hidi/Microsoft.OpenApi.Hidi.csproj +++ b/src/Microsoft.OpenApi.Hidi/Microsoft.OpenApi.Hidi.csproj @@ -9,7 +9,7 @@ enable hidi ./../../artifacts - 1.3.5 + 1.3.6 OpenAPI.NET CLI tool for slicing OpenAPI documents true diff --git a/src/Microsoft.OpenApi.Readers/Microsoft.OpenApi.Readers.csproj b/src/Microsoft.OpenApi.Readers/Microsoft.OpenApi.Readers.csproj index dd422d6ef..d7d866263 100644 --- a/src/Microsoft.OpenApi.Readers/Microsoft.OpenApi.Readers.csproj +++ b/src/Microsoft.OpenApi.Readers/Microsoft.OpenApi.Readers.csproj @@ -3,7 +3,7 @@ netstandard2.0 latest true - 1.6.10 + 1.6.11 OpenAPI.NET Readers for JSON and YAML documents true diff --git a/src/Microsoft.OpenApi/Microsoft.OpenApi.csproj b/src/Microsoft.OpenApi/Microsoft.OpenApi.csproj index 047a39f77..d949685c6 100644 --- a/src/Microsoft.OpenApi/Microsoft.OpenApi.csproj +++ b/src/Microsoft.OpenApi/Microsoft.OpenApi.csproj @@ -3,7 +3,7 @@ netstandard2.0 Latest true - 1.6.10 + 1.6.11 .NET models with JSON and YAML writers for OpenAPI specification true